/** * @param \Spryker\Zed\Collector\Business\Model\BatchResultInterface $result * * @throws \Spryker\Zed\Collector\Business\Exporter\Exception\BatchResultException * * @return void */ protected function handleResult(BatchResultInterface $result) { if ($result->isFailed()) { throw new BatchResultException(sprintf('Processed %d from %d for locale %s, where %d were deleted and %d failed.', $result->getProcessedCount(), $result->getTotalCount(), $result->getProcessedLocale(), $result->getDeletedCount(), $result->getFailedCount())); } }
/** * @param \Spryker\Zed\Collector\Business\Model\BatchResultInterface $batchResult * @param string $type * @param \DateTime $startTime * * @return void */ protected function finishExport(BatchResultInterface $batchResult, $type, \DateTime $startTime) { if (!$batchResult->isFailed()) { $this->marker->setLastExportMarkByTypeAndLocale($type, $batchResult->getProcessedLocale(), $startTime); } }