diff options
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/AbstractImport.php')
-rw-r--r-- | src/Wallabag/ImportBundle/Import/AbstractImport.php | 15 |
1 files changed, 14 insertions, 1 deletions
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 | |||
21 | protected $markAsRead; | 21 | protected $markAsRead; |
22 | protected $skippedEntries = 0; | 22 | protected $skippedEntries = 0; |
23 | protected $importedEntries = 0; | 23 | protected $importedEntries = 0; |
24 | protected $queuedEntries = 0; | ||
24 | 25 | ||
25 | public function __construct(EntityManager $em, ContentProxy $contentProxy) | 26 | public function __construct(EntityManager $em, ContentProxy $contentProxy) |
26 | { | 27 | { |
@@ -145,13 +146,25 @@ abstract class AbstractImport implements ImportInterface | |||
145 | $importedEntry = $this->setEntryAsRead($importedEntry); | 146 | $importedEntry = $this->setEntryAsRead($importedEntry); |
146 | } | 147 | } |
147 | 148 | ||
148 | ++$this->importedEntries; | 149 | ++$this->queuedEntries; |
149 | 150 | ||
150 | $this->producer->publish(json_encode($importedEntry)); | 151 | $this->producer->publish(json_encode($importedEntry)); |
151 | } | 152 | } |
152 | } | 153 | } |
153 | 154 | ||
154 | /** | 155 | /** |
156 | * {@inheritdoc} | ||
157 | */ | ||
158 | public function getSummary() | ||
159 | { | ||
160 | return [ | ||
161 | 'skipped' => $this->skippedEntries, | ||
162 | 'imported' => $this->importedEntries, | ||
163 | 'queued' => $this->queuedEntries, | ||
164 | ]; | ||
165 | } | ||
166 | |||
167 | /** | ||
155 | * Parse one entry. | 168 | * Parse one entry. |
156 | * | 169 | * |
157 | * @param array $importedEntry | 170 | * @param array $importedEntry |