mirror of https://github.com/wallabag/wallabag.git
Replace RabbitMQ injection with CraueConfiguration
This commit is contained in:
parent
e31ee20dd7
commit
40d2a29443
|
@ -9,6 +9,7 @@ export_json: Enable JSON export
|
||||||
export_txt: Enable TXT export
|
export_txt: Enable TXT export
|
||||||
export_xml: Enable XML export
|
export_xml: Enable XML export
|
||||||
pocket_consumer_key: Consumer key for Pocket to import contents (https://getpocket.com/developer/docs/authentication)
|
pocket_consumer_key: Consumer key for Pocket to import contents (https://getpocket.com/developer/docs/authentication)
|
||||||
|
rabbitmq: Enable RabbitMQ to import data asynchronously
|
||||||
shaarli_url: Shaarli URL, if the service is enabled
|
shaarli_url: Shaarli URL, if the service is enabled
|
||||||
share_diaspora: Enable share to Diaspora
|
share_diaspora: Enable share to Diaspora
|
||||||
share_mail: Enable share by email
|
share_mail: Enable share by email
|
||||||
|
|
|
@ -321,6 +321,11 @@ class InstallCommand extends ContainerAwareCommand
|
||||||
'value' => null,
|
'value' => null,
|
||||||
'section' => 'import',
|
'section' => 'import',
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'name' => 'rabbitmq',
|
||||||
|
'value' => '0',
|
||||||
|
'section' => 'import',
|
||||||
|
],
|
||||||
[
|
[
|
||||||
'name' => 'show_printlink',
|
'name' => 'show_printlink',
|
||||||
'value' => '1',
|
'value' => '1',
|
||||||
|
|
|
@ -95,6 +95,11 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface
|
||||||
'value' => null,
|
'value' => null,
|
||||||
'section' => 'import',
|
'section' => 'import',
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'name' => 'rabbitmq',
|
||||||
|
'value' => '0',
|
||||||
|
'section' => 'import',
|
||||||
|
],
|
||||||
[
|
[
|
||||||
'name' => 'show_printlink',
|
'name' => 'show_printlink',
|
||||||
'value' => '1',
|
'value' => '1',
|
||||||
|
|
|
@ -25,14 +25,14 @@ class PocketImport extends AbstractImport
|
||||||
private $producer;
|
private $producer;
|
||||||
private $rabbitMQ;
|
private $rabbitMQ;
|
||||||
|
|
||||||
public function __construct(TokenStorageInterface $tokenStorage, EntityManager $em, ContentProxy $contentProxy, Config $craueConfig, $rabbitMQ, Producer $producer)
|
public function __construct(TokenStorageInterface $tokenStorage, EntityManager $em, ContentProxy $contentProxy, Config $craueConfig, Producer $producer)
|
||||||
{
|
{
|
||||||
$this->user = $tokenStorage->getToken()->getUser();
|
$this->user = $tokenStorage->getToken()->getUser();
|
||||||
$this->em = $em;
|
$this->em = $em;
|
||||||
$this->contentProxy = $contentProxy;
|
$this->contentProxy = $contentProxy;
|
||||||
$this->consumerKey = $craueConfig->get('pocket_consumer_key');
|
$this->consumerKey = $craueConfig->get('pocket_consumer_key');
|
||||||
$this->logger = new NullLogger();
|
$this->logger = new NullLogger();
|
||||||
$this->rabbitMQ = $rabbitMQ;
|
$this->rabbitMQ = $craueConfig->get('rabbitmq');
|
||||||
$this->producer = $producer;
|
$this->producer = $producer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ services:
|
||||||
- "@doctrine.orm.entity_manager"
|
- "@doctrine.orm.entity_manager"
|
||||||
- "@wallabag_core.content_proxy"
|
- "@wallabag_core.content_proxy"
|
||||||
- "@craue_config"
|
- "@craue_config"
|
||||||
- %rabbitmq%
|
|
||||||
- "@old_sound_rabbit_mq.wallabag_producer"
|
- "@old_sound_rabbit_mq.wallabag_producer"
|
||||||
calls:
|
calls:
|
||||||
- [ setClient, [ "@wallabag_import.pocket.client" ] ]
|
- [ setClient, [ "@wallabag_import.pocket.client" ] ]
|
||||||
|
|
|
@ -75,7 +75,6 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
|
||||||
$this->em,
|
$this->em,
|
||||||
$this->contentProxy,
|
$this->contentProxy,
|
||||||
$config,
|
$config,
|
||||||
$rabbitMQ,
|
|
||||||
$this->producer
|
$this->producer
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue