]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Controller/PocketController.php
Only display message in queue for admin
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Controller / PocketController.php
index a2dcd8a7f0ff5df767197780e03b73f3c84feeea..1f92c1828c00c8c92553ccaad58b1a53fcced6cb 100644 (file)
@@ -20,8 +20,10 @@ class PocketController extends Controller
         $pocket = $this->get('wallabag_import.pocket.import');
         $pocket->setUser($this->getUser());
 
-        if ($this->get('craue_config')->get('rabbitmq')) {
-            $pocket->setRabbitmqProducer($this->get('old_sound_rabbit_mq.wallabag_pocket_producer'));
+        if ($this->get('craue_config')->get('import_with_rabbitmq')) {
+            $pocket->setProducer($this->get('old_sound_rabbit_mq.import_pocket_producer'));
+        } elseif ($this->get('craue_config')->get('import_with_redis')) {
+            $pocket->setProducer($this->get('wallabag_import.producer.redis.pocket'));
         }
 
         return $pocket;
@@ -100,6 +102,12 @@ class PocketController extends Controller
                 '%imported%' => $summary['imported'],
                 '%skipped%' => $summary['skipped'],
             ]);
+
+            if (0 < $summary['queued']) {
+                $message = $this->get('translator')->trans('flashes.import.notice.summary_with_queue', [
+                    '%queued%' => $summary['queued'],
+                ]);
+            }
         }
 
         $this->get('session')->getFlashBag()->add(