diff options
6 files changed, 13 insertions, 4 deletions
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml index 48d0ec4b..731e6099 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml | |||
@@ -9,6 +9,7 @@ export_json: Enable JSON export | |||
9 | export_txt: Enable TXT export | 9 | export_txt: Enable TXT export |
10 | export_xml: Enable XML export | 10 | export_xml: Enable XML export |
11 | pocket_consumer_key: Consumer key for Pocket to import contents (https://getpocket.com/developer/docs/authentication) | 11 | pocket_consumer_key: Consumer key for Pocket to import contents (https://getpocket.com/developer/docs/authentication) |
12 | rabbitmq: Enable RabbitMQ to import data asynchronously | ||
12 | shaarli_url: Shaarli URL, if the service is enabled | 13 | shaarli_url: Shaarli URL, if the service is enabled |
13 | share_diaspora: Enable share to Diaspora | 14 | share_diaspora: Enable share to Diaspora |
14 | share_mail: Enable share by email | 15 | share_mail: Enable share by email |
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index 143def4f..8a2439ec 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php | |||
@@ -322,6 +322,11 @@ class InstallCommand extends ContainerAwareCommand | |||
322 | 'section' => 'import', | 322 | 'section' => 'import', |
323 | ], | 323 | ], |
324 | [ | 324 | [ |
325 | 'name' => 'rabbitmq', | ||
326 | 'value' => '0', | ||
327 | 'section' => 'import', | ||
328 | ], | ||
329 | [ | ||
325 | 'name' => 'show_printlink', | 330 | 'name' => 'show_printlink', |
326 | 'value' => '1', | 331 | 'value' => '1', |
327 | 'section' => 'entry', | 332 | 'section' => 'entry', |
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php index b4309304..778f91ed 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php | |||
@@ -96,6 +96,11 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface | |||
96 | 'section' => 'import', | 96 | 'section' => 'import', |
97 | ], | 97 | ], |
98 | [ | 98 | [ |
99 | 'name' => 'rabbitmq', | ||
100 | 'value' => '0', | ||
101 | 'section' => 'import', | ||
102 | ], | ||
103 | [ | ||
99 | 'name' => 'show_printlink', | 104 | 'name' => 'show_printlink', |
100 | 'value' => '1', | 105 | 'value' => '1', |
101 | 'section' => 'entry', | 106 | 'section' => 'entry', |
diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php index b02894f0..7d1c0c61 100644 --- a/src/Wallabag/ImportBundle/Import/PocketImport.php +++ b/src/Wallabag/ImportBundle/Import/PocketImport.php | |||
@@ -25,14 +25,14 @@ class PocketImport extends AbstractImport | |||
25 | private $producer; | 25 | private $producer; |
26 | private $rabbitMQ; | 26 | private $rabbitMQ; |
27 | 27 | ||
28 | public function __construct(TokenStorageInterface $tokenStorage, EntityManager $em, ContentProxy $contentProxy, Config $craueConfig, $rabbitMQ, Producer $producer) | 28 | public function __construct(TokenStorageInterface $tokenStorage, EntityManager $em, ContentProxy $contentProxy, Config $craueConfig, Producer $producer) |
29 | { | 29 | { |
30 | $this->user = $tokenStorage->getToken()->getUser(); | 30 | $this->user = $tokenStorage->getToken()->getUser(); |
31 | $this->em = $em; | 31 | $this->em = $em; |
32 | $this->contentProxy = $contentProxy; | 32 | $this->contentProxy = $contentProxy; |
33 | $this->consumerKey = $craueConfig->get('pocket_consumer_key'); | 33 | $this->consumerKey = $craueConfig->get('pocket_consumer_key'); |
34 | $this->logger = new NullLogger(); | 34 | $this->logger = new NullLogger(); |
35 | $this->rabbitMQ = $rabbitMQ; | 35 | $this->rabbitMQ = $craueConfig->get('rabbitmq'); |
36 | $this->producer = $producer; | 36 | $this->producer = $producer; |
37 | } | 37 | } |
38 | 38 | ||
diff --git a/src/Wallabag/ImportBundle/Resources/config/services.yml b/src/Wallabag/ImportBundle/Resources/config/services.yml index 7ea54162..60eb4e18 100644 --- a/src/Wallabag/ImportBundle/Resources/config/services.yml +++ b/src/Wallabag/ImportBundle/Resources/config/services.yml | |||
@@ -25,7 +25,6 @@ services: | |||
25 | - "@doctrine.orm.entity_manager" | 25 | - "@doctrine.orm.entity_manager" |
26 | - "@wallabag_core.content_proxy" | 26 | - "@wallabag_core.content_proxy" |
27 | - "@craue_config" | 27 | - "@craue_config" |
28 | - %rabbitmq% | ||
29 | - "@old_sound_rabbit_mq.wallabag_producer" | 28 | - "@old_sound_rabbit_mq.wallabag_producer" |
30 | calls: | 29 | calls: |
31 | - [ setClient, [ "@wallabag_import.pocket.client" ] ] | 30 | - [ setClient, [ "@wallabag_import.pocket.client" ] ] |
diff --git a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php index a0f943ee..5bf47d96 100644 --- a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php | |||
@@ -75,7 +75,6 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase | |||
75 | $this->em, | 75 | $this->em, |
76 | $this->contentProxy, | 76 | $this->contentProxy, |
77 | $config, | 77 | $config, |
78 | $rabbitMQ, | ||
79 | $this->producer | 78 | $this->producer |
80 | ); | 79 | ); |
81 | 80 | ||