/** * @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())); } }
/** * 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)); }