示例#1
0
 public function execute(Job $job)
 {
     parent::execute($job);
     $e = new JobException(200, 'All done');
     $e->setStatus(Job::STATUS_SUCCESS)->setResult(array('testing' => 'value'));
     throw $e;
 }
示例#2
0
 public function execute(Job $job)
 {
     parent::execute($job);
     $e = new JobException(400, 'One of orchestration tasks failed');
     $e->setStatus(Job::STATUS_WARNING)->setResult(array('testing' => 'value'));
     throw $e;
 }
示例#3
0
 /**
  * @param Job $job
  * @return array
  */
 public function execute(Job $job)
 {
     parent::execute($job);
     $this->job = $job;
     return ['testing' => 'HookExecutor'];
 }
示例#4
0
 public function cleanup(Job $job)
 {
     parent::cleanup($job);
 }
示例#5
0
 public function execute(Job $job)
 {
     parent::execute($job);
     throw new MaintenanceException('maintenance');
 }