From 9357b3a4ec64fbcca58967d0319065de7d363560 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 28 Jan 2017 10:50:25 -0500 Subject: Add command to execute individual job --- app/Console/JobCommand.php | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 app/Console/JobCommand.php (limited to 'app/Console') diff --git a/app/Console/JobCommand.php b/app/Console/JobCommand.php new file mode 100644 index 00000000..bdaae32f --- /dev/null +++ b/app/Console/JobCommand.php @@ -0,0 +1,35 @@ +setName('job') + ->setDescription('Execute individual job (read payload from stdin)') + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $payload = fgets(STDIN); + + $job = new Job(); + $job->unserialize($payload); + + JobHandler::getInstance($this->container)->executeJob($job); + } +} -- cgit v1.2.3