Conditions | 2 |
Paths | 2 |
Total Lines | 21 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | protected function execute(InputInterface $input, OutputInterface $output) |
||
32 | { |
||
33 | $queue = $input->getArgument('queue'); |
||
34 | $consume = $this |
||
35 | ->getContainer() |
||
36 | ->get('innmind.amqp.consumers') |
||
37 | ->get($queue); |
||
38 | |||
39 | $consumer = $this |
||
40 | ->getContainer() |
||
41 | ->get('innmind.amqp.client') |
||
42 | ->channel() |
||
43 | ->basic() |
||
44 | ->consume(new Consume($queue)); |
||
45 | |||
46 | if ($input->getArgument('number')) { |
||
47 | $consumer->take((int) $input->getArgument('number')); |
||
48 | } |
||
49 | |||
50 | $consumer->foreach($consume); |
||
51 | } |
||
52 | } |
||
53 |