public function collect() { if (!$this->itemProcessCollection->count()) { return; } $items = $this->itemProcessCollection->toArray(); $this->collectItemsByValuesInProcessList($items); parent::collect(); }
protected function saveImportLog() { $this->importLog->setUserLastIndex($this->lastItemIndex); $this->importLog->setUnProcessItemCount($this->itemCollector->getUnProcessItemCount()); $this->importLog->setRuntime($this->runtimeWatcher->getRuntime()); $error = $this->getError(); $this->importLog->setError($error[0]); $log = $this->importLog->getUserLog(); $this->entityManager->persist($log); $this->entityManager->flush(); }
public function init() { $this->initEntityCollection(); $this->initItemProcessCollection(); parent::init(); }
/** * @return ItemCollector */ public function getItemCollector() { $this->itemCollector->setFlushItemPackageNumber($this->flushItemPackageNumber); $this->itemCollector->setItemProcessLimit($this->itemProcessLimit); return $this->itemCollector; }