diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-09-09 21:02:03 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-09-11 21:58:56 +0200 |
commit | b3437d58ae224121375c99e9288d8b808524e624 (patch) | |
tree | 94ce3446aed4396ba9304b8c97e421eba35e4edf /src/Wallabag/ImportBundle/Controller | |
parent | 7f7531171f6e49110b5842f869e37c766a682473 (diff) | |
download | wallabag-b3437d58ae224121375c99e9288d8b808524e624.tar.gz wallabag-b3437d58ae224121375c99e9288d8b808524e624.tar.zst wallabag-b3437d58ae224121375c99e9288d8b808524e624.zip |
Enable Redis async import
- using javibravo/simpleue
- internal config value are now `import_with_redis` & `import_with_rabbit` which are more clear
- if both option are enable rabbit will be choosen
- services imports related to async are now splitted into 2 files: `redis.yml` & `rabbit.yml`
-
Diffstat (limited to 'src/Wallabag/ImportBundle/Controller')
4 files changed, 16 insertions, 8 deletions
diff --git a/src/Wallabag/ImportBundle/Controller/PocketController.php b/src/Wallabag/ImportBundle/Controller/PocketController.php index 57c007c3..3d555717 100644 --- a/src/Wallabag/ImportBundle/Controller/PocketController.php +++ b/src/Wallabag/ImportBundle/Controller/PocketController.php | |||
@@ -20,8 +20,10 @@ class PocketController extends Controller | |||
20 | $pocket = $this->get('wallabag_import.pocket.import'); | 20 | $pocket = $this->get('wallabag_import.pocket.import'); |
21 | $pocket->setUser($this->getUser()); | 21 | $pocket->setUser($this->getUser()); |
22 | 22 | ||
23 | if ($this->get('craue_config')->get('rabbitmq')) { | 23 | if ($this->get('craue_config')->get('import_with_rabbitmq')) { |
24 | $pocket->setRabbitmqProducer($this->get('old_sound_rabbit_mq.import_pocket_producer')); | 24 | $pocket->setProducer($this->get('old_sound_rabbit_mq.import_pocket_producer')); |
25 | } elseif ($this->get('craue_config')->get('import_with_redis')) { | ||
26 | $pocket->setProducer($this->get('wallabag_import.producer.redis.pocket')); | ||
25 | } | 27 | } |
26 | 28 | ||
27 | return $pocket; | 29 | return $pocket; |
diff --git a/src/Wallabag/ImportBundle/Controller/ReadabilityController.php b/src/Wallabag/ImportBundle/Controller/ReadabilityController.php index ee875a40..61243042 100644 --- a/src/Wallabag/ImportBundle/Controller/ReadabilityController.php +++ b/src/Wallabag/ImportBundle/Controller/ReadabilityController.php | |||
@@ -20,8 +20,10 @@ class ReadabilityController extends Controller | |||
20 | $readability = $this->get('wallabag_import.readability.import'); | 20 | $readability = $this->get('wallabag_import.readability.import'); |
21 | $readability->setUser($this->getUser()); | 21 | $readability->setUser($this->getUser()); |
22 | 22 | ||
23 | if ($this->get('craue_config')->get('rabbitmq')) { | 23 | if ($this->get('craue_config')->get('import_with_rabbitmq')) { |
24 | $readability->setRabbitmqProducer($this->get('old_sound_rabbit_mq.import_readability_producer')); | 24 | $readability->setProducer($this->get('old_sound_rabbit_mq.import_readability_producer')); |
25 | } elseif ($this->get('craue_config')->get('import_with_redis')) { | ||
26 | $readability->setProducer($this->get('wallabag_import.producer.redis.readability')); | ||
25 | } | 27 | } |
26 | 28 | ||
27 | if ($form->isValid()) { | 29 | if ($form->isValid()) { |
diff --git a/src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php b/src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php index f80aec3a..312c7a35 100644 --- a/src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php +++ b/src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php | |||
@@ -14,8 +14,10 @@ class WallabagV1Controller extends WallabagController | |||
14 | { | 14 | { |
15 | $service = $this->get('wallabag_import.wallabag_v1.import'); | 15 | $service = $this->get('wallabag_import.wallabag_v1.import'); |
16 | 16 | ||
17 | if ($this->get('craue_config')->get('rabbitmq')) { | 17 | if ($this->get('craue_config')->get('import_with_rabbitmq')) { |
18 | $service->setRabbitmqProducer($this->get('old_sound_rabbit_mq.import_wallabag_v1_producer')); | 18 | $service->setProducer($this->get('old_sound_rabbit_mq.import_wallabag_v1_producer')); |
19 | } elseif ($this->get('craue_config')->get('import_with_redis')) { | ||
20 | $service->setProducer($this->get('wallabag_import.producer.redis.wallabag_v1')); | ||
19 | } | 21 | } |
20 | 22 | ||
21 | return $service; | 23 | return $service; |
diff --git a/src/Wallabag/ImportBundle/Controller/WallabagV2Controller.php b/src/Wallabag/ImportBundle/Controller/WallabagV2Controller.php index 063cddd9..45211fe6 100644 --- a/src/Wallabag/ImportBundle/Controller/WallabagV2Controller.php +++ b/src/Wallabag/ImportBundle/Controller/WallabagV2Controller.php | |||
@@ -14,8 +14,10 @@ class WallabagV2Controller extends WallabagController | |||
14 | { | 14 | { |
15 | $service = $this->get('wallabag_import.wallabag_v2.import'); | 15 | $service = $this->get('wallabag_import.wallabag_v2.import'); |
16 | 16 | ||
17 | if ($this->get('craue_config')->get('rabbitmq')) { | 17 | if ($this->get('craue_config')->get('import_with_rabbitmq')) { |
18 | $service->setRabbitmqProducer($this->get('old_sound_rabbit_mq.import_wallabag_v2_producer')); | 18 | $service->setProducer($this->get('old_sound_rabbit_mq.import_wallabag_v2_producer')); |
19 | } elseif ($this->get('craue_config')->get('import_with_redis')) { | ||
20 | $service->setProducer($this->get('wallabag_import.producer.redis.wallabag_v2')); | ||
19 | } | 21 | } |
20 | 22 | ||
21 | return $service; | 23 | return $service; |