diff --git a/Service/SyncService.php b/Service/SyncService.php index 6f6d685..004ce9c 100755 --- a/Service/SyncService.php +++ b/Service/SyncService.php @@ -62,6 +62,10 @@ public function getFromMappings($mappings) { $deletes = $this->em->getRepository(SyncDeleteState::class)->findFromTimestamp($mappingName, $timestamp); $newItems = $this->em->getRepository(SyncNewItemState::class)->findFromTimestampAndMapping($mappingName, $timestamp); + /** + * Failed Items Synchronization + */ + $failedItems = $this->em->getRepository('NTISyncBundle:SyncFailedItemState')->findFromTimestampAndMapping($mappingName, $timestamp); /** @var SyncRepositoryInterface $repository */ $repository = $this->em->getRepository($syncMapping->getClass()); @@ -76,6 +80,7 @@ public function getFromMappings($mappings) { 'changes' => $result["data"], 'deletes' => json_decode($this->container->get('jms_serializer')->serialize($deletes, 'json'), true), 'newItems' => json_decode($this->container->get('jms_serializer')->serialize($newItems, 'json'), true), + 'failedItems' => json_decode($this->container->get('jms_serializer')->serialize($failedItems, 'json'), true), SyncState::REAL_LAST_TIMESTAMP => $result[SyncState::REAL_LAST_TIMESTAMP], ); } @@ -136,4 +141,4 @@ public function addToDeleteSyncState($class, $id) { error_log($ex->getMessage()); } } -} \ No newline at end of file +}