feat: long running queue with 1 hour of timeout
This commit is contained in:
@@ -34,7 +34,7 @@ function queue_application_deployment(int $application_id, string $deployment_uu
|
||||
force_rebuild: $force_rebuild,
|
||||
rollback_commit: $commit,
|
||||
pull_request_id: $pull_request_id,
|
||||
));
|
||||
))->onConnection('long-running')->onQueue('long-running');
|
||||
}
|
||||
|
||||
function queue_next_deployment(Application $application)
|
||||
@@ -47,6 +47,6 @@ function queue_next_deployment(Application $application)
|
||||
deployment_uuid: $next_found->deployment_uuid,
|
||||
force_rebuild: $next_found->force_rebuild,
|
||||
pull_request_id: $next_found->pull_request_id
|
||||
));
|
||||
))->onConnection('long-running')->onQueue('long-running');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ function git_api(GithubApp|GitlabApp $source, string $endpoint, string $method =
|
||||
}
|
||||
$json = $response->json();
|
||||
if ($response->failed() && $throwError) {
|
||||
throw new \Exception("Failed to get data from {$source->name} with error: " . $json['message']);
|
||||
throw new \Exception("Failed to get data from {$source->name} with error:<br><br>" . $json['message']);
|
||||
}
|
||||
return [
|
||||
'rate_limit_remaining' => $response->header('X-RateLimit-Remaining'),
|
||||
|
||||
Reference in New Issue
Block a user