Command/Worker/ExecuteCommand.php
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $name = $input->getArgument('name');

        /** @var $factory \Orkestra\Bundle\ApplicationBundle\Worker\WorkerFactoryInterface */
        $factory = $this->getContainer()->get('orkestra.worker_factory');
        $worker = $factory->getWorker($name);

        $worker->execute();

        $output->writeln(array(
            '',
            'The worker has completed successfully.',
            ''
        ));
    }
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $name = $input->getArgument('name');

        /** @var $factory \Orkestra\Bundle\ApplicationBundle\Worker\WorkerFactoryInterface */
        $factory = $this->getContainer()->get('orkestra.worker_factory');
        $worker = $factory->getWorker($name);

        $worker->execute();

        $output->writeln(array(
            '',
            'The worker has completed successfully.',
            ''
        ));
    }
Executes the current command

@param \Symfony\Component\Console\Input\InputInterface $input
@param \Symfony\Component\Console\Output\OutputInterface $output