Completed
Push — master ( ea9ffc...4b17ca )
by Daniel
19:33
created

RpcServerCommand::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace Application\Infrastructure\Command;
4
5
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
6
use Symfony\Component\Console\Input\InputInterface;
7
use Symfony\Component\Console\Output\OutputInterface;
8
9
class RpcServerCommand extends ContainerAwareCommand
10
{
11
    protected function configure()
12
    {
13
        $this->setName('cmobi:rpc-server:run')
14
            ->setDescription('Run rpcserver');
15
    }
16
17
    protected function execute(InputInterface $input, OutputInterface $output)
18
    {
19
        $output->writeln(date('Y-m-d H:i:s') . 'cmobi:rpc-server:run ................... Running Server');
20
        $server = $this->getContainer()->get('cmobi_rabbitmq.rpc_server');
21
22
        $server->run();
23
24
        $output->writeln(date('Y-m-d H:i:s') . 'cmobi:rpc-server:run ................... Exiting Server');
25
    }
26
}