Пример #1
0
 /**
  * Runs the history batch update process for selected market types and regions. This is done with parallel async
  * CURL calls and DB submission + committing in batches.
  *
  * @param array $typeIds of the market types
  * @param array $regionIds of the marget regions
  * @param bool $verbose whether the items currently being updated should be printed to console
  *
  * @return void
  */
 public function runHistoryBatch(array $typeIds, array $regionIds, $verbose = false)
 {
     $this->verboseBatch = $verbose;
     foreach (array_unique($regionIds) as $regionId) {
         $this->endpointHandler->getMultiMarketHistory($typeIds, $regionId, function (Response $response) {
             $this->processHistoryResponse($response);
         }, function (Response $response) {
             print_r($response);
             //TODO
         }, false);
     }
     $this->commitSql();
 }