コード例 #1
0
 /**
  * @param ImportPart[]    $parts
  * @param OutputInterface $output
  */
 protected function scheduleParts(array $parts, OutputInterface $output)
 {
     foreach ($parts as $part) {
         if ($this->processor->isRunning($part)) {
             continue;
         }
         $this->scheduler->schedulePart($part);
         $output->writeln(sprintf('Rescheduled part <comment>%d</comment> of <comment>%s</comment> import with id <comment>%s</comment>', $part->getPosition(), $part->getImport()->getFeed()->getOrigin()->getTitle(), $part->getImport()->getId()));
     }
 }
コード例 #2
0
ファイル: ImportJob.php プロジェクト: treehouselabs/io-bundle
 /**
  * Starts the import part.
  */
 protected function start()
 {
     $this->processor->markProcessing($this->part);
     $this->repository->startImportPart($this->part);
     $this->importer->dispatchEvent(ImportEvents::PART_START, new ImporterEvent($this->part, $this->importer));
 }