diff --git a/src/Command/Scheduler/PruneCommand.php b/src/Command/Scheduler/PruneCommand.php index 7e26126..d161f5a 100644 --- a/src/Command/Scheduler/PruneCommand.php +++ b/src/Command/Scheduler/PruneCommand.php @@ -2,7 +2,7 @@ namespace Glooby\TaskBundle\Command\Scheduler; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; @@ -11,7 +11,7 @@ /** * @author Emil Kilhage */ -class PruneCommand extends ContainerAwareCommand +class PruneCommand extends Command { private $container; @@ -41,5 +41,8 @@ protected function execute(InputInterface $input, OutputInterface $output) } else { $pruner->run(); } + + // TODO add logging (example if an error occurs) - and return zero + return 1; } } diff --git a/src/Command/Scheduler/RunCommand.php b/src/Command/Scheduler/RunCommand.php index c18da33..6c40053 100644 --- a/src/Command/Scheduler/RunCommand.php +++ b/src/Command/Scheduler/RunCommand.php @@ -2,7 +2,7 @@ namespace Glooby\TaskBundle\Command\Scheduler; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -10,7 +10,7 @@ /** * @author Emil Kilhage */ -class RunCommand extends ContainerAwareCommand +class RunCommand extends Command { private $container; @@ -41,5 +41,8 @@ protected function execute(InputInterface $input, OutputInterface $output) $scheduler = $this->container->get('glooby_task.queue_scheduler'); $scheduler->schedule(); + + // TODO add logging (example if an error occurs) - and return zero + return 1; } } diff --git a/src/Command/Scheduler/SyncCommand.php b/src/Command/Scheduler/SyncCommand.php index 2bc43cd..a38c407 100644 --- a/src/Command/Scheduler/SyncCommand.php +++ b/src/Command/Scheduler/SyncCommand.php @@ -2,7 +2,7 @@ namespace Glooby\TaskBundle\Command\Scheduler; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; @@ -11,7 +11,7 @@ /** * @author Emil Kilhage */ -class SyncCommand extends ContainerAwareCommand +class SyncCommand extends Command { private $container; @@ -38,5 +38,8 @@ protected function execute(InputInterface $input, OutputInterface $output) $client = $this->container->get('glooby_task.schedule_synchronizer'); $client->setForce($input->getOption('force')); $client->sync(); + + // TODO add logging (example if an error occurs) - and return zero + return 1; } } diff --git a/src/Command/Task/RunCommand.php b/src/Command/Task/RunCommand.php index 04b955d..3d12fdd 100644 --- a/src/Command/Task/RunCommand.php +++ b/src/Command/Task/RunCommand.php @@ -60,6 +60,8 @@ protected function execute(InputInterface $input, OutputInterface $output) $output->writeln($response); } } + + return 1; } /**