mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-23 01:21:03 +00:00
Replace RabbitMQ injection with CraueConfiguration
This commit is contained in:
parent
e31ee20dd7
commit
40d2a29443
6 changed files with 13 additions and 4 deletions
|
@ -9,6 +9,7 @@ export_json: Enable JSON export
|
|||
export_txt: Enable TXT export
|
||||
export_xml: Enable XML export
|
||||
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
|
||||
share_diaspora: Enable share to Diaspora
|
||||
share_mail: Enable share by email
|
||||
|
|
|
@ -321,6 +321,11 @@ class InstallCommand extends ContainerAwareCommand
|
|||
'value' => null,
|
||||
'section' => 'import',
|
||||
],
|
||||
[
|
||||
'name' => 'rabbitmq',
|
||||
'value' => '0',
|
||||
'section' => 'import',
|
||||
],
|
||||
[
|
||||
'name' => 'show_printlink',
|
||||
'value' => '1',
|
||||
|
|
|
@ -95,6 +95,11 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface
|
|||
'value' => null,
|
||||
'section' => 'import',
|
||||
],
|
||||
[
|
||||
'name' => 'rabbitmq',
|
||||
'value' => '0',
|
||||
'section' => 'import',
|
||||
],
|
||||
[
|
||||
'name' => 'show_printlink',
|
||||
'value' => '1',
|
||||
|
|
|
@ -25,14 +25,14 @@ class PocketImport extends AbstractImport
|
|||
private $producer;
|
||||
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->em = $em;
|
||||
$this->contentProxy = $contentProxy;
|
||||
$this->consumerKey = $craueConfig->get('pocket_consumer_key');
|
||||
$this->logger = new NullLogger();
|
||||
$this->rabbitMQ = $rabbitMQ;
|
||||
$this->rabbitMQ = $craueConfig->get('rabbitmq');
|
||||
$this->producer = $producer;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@ services:
|
|||
- "@doctrine.orm.entity_manager"
|
||||
- "@wallabag_core.content_proxy"
|
||||
- "@craue_config"
|
||||
- %rabbitmq%
|
||||
- "@old_sound_rabbit_mq.wallabag_producer"
|
||||
calls:
|
||||
- [ setClient, [ "@wallabag_import.pocket.client" ] ]
|
||||
|
|
|
@ -75,7 +75,6 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
|
|||
$this->em,
|
||||
$this->contentProxy,
|
||||
$config,
|
||||
$rabbitMQ,
|
||||
$this->producer
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue