X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FImportBundle%2FImport%2FAbstractImport.php;h=2af0e69b473a0e117f02c2efd66de5512004331c;hb=c80cc01afa315dcfa38b2a01c5b05d4516659c24;hp=4cd8e846cef81f6d91aadc8ff2e7843f536ee800;hpb=e01a3c98d6908e95121b5ade0161f40af1b05ca6;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ImportBundle/Import/AbstractImport.php b/src/Wallabag/ImportBundle/Import/AbstractImport.php index 4cd8e846..2af0e69b 100644 --- a/src/Wallabag/ImportBundle/Import/AbstractImport.php +++ b/src/Wallabag/ImportBundle/Import/AbstractImport.php @@ -21,6 +21,7 @@ abstract class AbstractImport implements ImportInterface protected $markAsRead; protected $skippedEntries = 0; protected $importedEntries = 0; + protected $queuedEntries = 0; public function __construct(EntityManager $em, ContentProxy $contentProxy) { @@ -145,12 +146,24 @@ abstract class AbstractImport implements ImportInterface $importedEntry = $this->setEntryAsRead($importedEntry); } - ++$this->importedEntries; + ++$this->queuedEntries; $this->producer->publish(json_encode($importedEntry)); } } + /** + * {@inheritdoc} + */ + public function getSummary() + { + return [ + 'skipped' => $this->skippedEntries, + 'imported' => $this->importedEntries, + 'queued' => $this->queuedEntries, + ]; + } + /** * Parse one entry. *