示例#1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     try {
         if (Status::update($input->getArgument('new_status'), $input->getArgument('job_id'), $input->getOption('namespace'))) {
             $output->write("Job updated!");
         } else {
             throw new \RuntimeException("Job could NOT updated.");
         }
     } catch (\RuntimeException $e) {
         $output->write("ERROR while update job: {$e->getMessage()}");
     }
 }
示例#2
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $status = Status::check($input->getArgument('job_id'), $input->getOption('namespace'));
     $output->write($status);
 }