Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/Command/Scheduler/PruneCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -11,7 +11,7 @@
/**
* @author Emil Kilhage
*/
class PruneCommand extends ContainerAwareCommand
class PruneCommand extends Command
{
private $container;

Expand Down Expand Up @@ -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;
}
}
7 changes: 5 additions & 2 deletions src/Command/Scheduler/RunCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

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;

/**
* @author Emil Kilhage
*/
class RunCommand extends ContainerAwareCommand
class RunCommand extends Command
{
private $container;

Expand Down Expand Up @@ -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;
}
}
7 changes: 5 additions & 2 deletions src/Command/Scheduler/SyncCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -11,7 +11,7 @@
/**
* @author Emil Kilhage
*/
class SyncCommand extends ContainerAwareCommand
class SyncCommand extends Command
{
private $container;

Expand All @@ -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;
}
}
2 changes: 2 additions & 0 deletions src/Command/Task/RunCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->writeln($response);
}
}

return 1;
}

/**
Expand Down