aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Command
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/ImportBundle/Command')
-rw-r--r--src/Wallabag/ImportBundle/Command/RedisWorkerCommand.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Wallabag/ImportBundle/Command/RedisWorkerCommand.php b/src/Wallabag/ImportBundle/Command/RedisWorkerCommand.php
index 85c5a903..5f90e00f 100644
--- a/src/Wallabag/ImportBundle/Command/RedisWorkerCommand.php
+++ b/src/Wallabag/ImportBundle/Command/RedisWorkerCommand.php
@@ -5,6 +5,7 @@ namespace Wallabag\ImportBundle\Command;
5use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; 5use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
6use Symfony\Component\Config\Definition\Exception\Exception; 6use Symfony\Component\Config\Definition\Exception\Exception;
7use Symfony\Component\Console\Input\InputArgument; 7use Symfony\Component\Console\Input\InputArgument;
8use Symfony\Component\Console\Input\InputOption;
8use Symfony\Component\Console\Input\InputInterface; 9use Symfony\Component\Console\Input\InputInterface;
9use Symfony\Component\Console\Output\OutputInterface; 10use Symfony\Component\Console\Output\OutputInterface;
10use Simpleue\Worker\QueueWorker; 11use Simpleue\Worker\QueueWorker;
@@ -17,6 +18,7 @@ class RedisWorkerCommand extends ContainerAwareCommand
17 ->setName('wallabag:import:redis-worker') 18 ->setName('wallabag:import:redis-worker')
18 ->setDescription('Launch Redis worker') 19 ->setDescription('Launch Redis worker')
19 ->addArgument('serviceName', InputArgument::REQUIRED, 'Service to use: wallabag_v1, wallabag_v2, pocket or readability') 20 ->addArgument('serviceName', InputArgument::REQUIRED, 'Service to use: wallabag_v1, wallabag_v2, pocket or readability')
21 ->addOption('maxIterations', '', InputOption::VALUE_OPTIONAL, 'Number of iterations before stoping', false)
20 ; 22 ;
21 } 23 }
22 24
@@ -33,7 +35,8 @@ class RedisWorkerCommand extends ContainerAwareCommand
33 35
34 $worker = new QueueWorker( 36 $worker = new QueueWorker(
35 $this->getContainer()->get('wallabag_import.queue.redis.'.$serviceName), 37 $this->getContainer()->get('wallabag_import.queue.redis.'.$serviceName),
36 $this->getContainer()->get('wallabag_import.consumer.redis.'.$serviceName) 38 $this->getContainer()->get('wallabag_import.consumer.redis.'.$serviceName),
39 $input->getOption('maxIterations')
37 ); 40 );
38 41
39 $worker->start(); 42 $worker->start();