X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FImportBundle%2FController%2FWallabagV1Controller.php;h=e1c35343851b4071781e204711011c2c96e52983;hb=92a66835624acf6fd14f5adc5f8aab399658592e;hp=f80aec3a475ac0439005ae8c04ebbe31e6064967;hpb=c98db1b653b5dc8b701422190b02d9fbf10c4e68;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php b/src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php index f80aec3a..e1c35343 100644 --- a/src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php +++ b/src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php @@ -2,11 +2,19 @@ namespace Wallabag\ImportBundle\Controller; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Routing\Annotation\Route; class WallabagV1Controller extends WallabagController { + /** + * @Route("/wallabag-v1", name="import_wallabag_v1") + */ + public function indexAction(Request $request) + { + return parent::indexAction($request); + } + /** * {@inheritdoc} */ @@ -14,8 +22,10 @@ class WallabagV1Controller extends WallabagController { $service = $this->get('wallabag_import.wallabag_v1.import'); - if ($this->get('craue_config')->get('rabbitmq')) { - $service->setRabbitmqProducer($this->get('old_sound_rabbit_mq.import_wallabag_v1_producer')); + if ($this->get('craue_config')->get('import_with_rabbitmq')) { + $service->setProducer($this->get('old_sound_rabbit_mq.import_wallabag_v1_producer')); + } elseif ($this->get('craue_config')->get('import_with_redis')) { + $service->setProducer($this->get('wallabag_import.producer.redis.wallabag_v1')); } return $service; @@ -28,12 +38,4 @@ class WallabagV1Controller extends WallabagController { return 'WallabagImportBundle:WallabagV1:index.html.twig'; } - - /** - * @Route("/wallabag-v1", name="import_wallabag_v1") - */ - public function indexAction(Request $request) - { - return parent::indexAction($request); - } }