コード例 #1
0
ファイル: SuccessExecutor.php プロジェクト: ErikZigo/syrup
 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
ファイル: WarningExecutor.php プロジェクト: ErikZigo/syrup
 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
ファイル: HookExecutor.php プロジェクト: ErikZigo/syrup
 /**
  * @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');
 }