aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Import/AbstractImport.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-09-13 21:09:05 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-09-13 21:09:05 +0200
commitc80cc01afa315dcfa38b2a01c5b05d4516659c24 (patch)
treeb6c51e22260584b2c340358d384bddf13b8c9418 /src/Wallabag/ImportBundle/Import/AbstractImport.php
parente01a3c98d6908e95121b5ade0161f40af1b05ca6 (diff)
downloadwallabag-c80cc01afa315dcfa38b2a01c5b05d4516659c24.tar.gz
wallabag-c80cc01afa315dcfa38b2a01c5b05d4516659c24.tar.zst
wallabag-c80cc01afa315dcfa38b2a01c5b05d4516659c24.zip
Change flash message for queued articles
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/AbstractImport.php')
-rw-r--r--src/Wallabag/ImportBundle/Import/AbstractImport.php15
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