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()}"); } }
protected function execute(InputInterface $input, OutputInterface $output) { $status = Status::check($input->getArgument('job_id'), $input->getOption('namespace')); $output->write($status); }