abortQueued() 공개 메소드

public abortQueued ( integer $project_id )
$project_id integer
예제 #1
0
 /**
  * Handles incoming requests to trigger deploy.
  *
  * @param Request $request
  * @param string $hash The webhook hash
  *
  * @return \Illuminate\View\View
  */
 public function webhook(Request $request, $hash)
 {
     $project = $this->projectRepository->getByHash($hash);
     $success = false;
     if ($project->servers->where('deploy_code', true)->count() > 0) {
         $payload = $this->parseWebhookRequest($request, $project);
         if (is_array($payload)) {
             $this->deploymentRepository->abortQueued($project->id);
             $this->deploymentRepository->create($payload);
             $success = true;
         }
     }
     return ['success' => $success];
 }