Пример #1
0
 /**
  * @param OutputInterface $output
  * @param ImportPart      $part
  */
 protected function runImportPart(OutputInterface $output, ImportPart $part)
 {
     $output->writeln(sprintf('Importing part <comment>%d</comment> of import <comment>%d</comment>', $part->getPosition(), $part->getImport()->getId()));
     $job = $this->importFactory->createImportJob($part);
     $job->setLogger($this->logger);
     $job->run();
 }
Пример #2
0
 /**
  * @param string $message
  */
 protected function fail($message)
 {
     // log the error
     $this->part->setError($message);
     $this->logger->error(sprintf('Importing part %d of import %d failed with message: %s', $this->part->getPosition(), $this->part->getImport()->getId(), $message));
 }