mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-17 17:21:04 +00:00
feat(api): Improve OpenAPI spec and add rate limit handling for Hetzner
- Add 429 response with Retry-After header for Hetzner server creation - Create RateLimitException for proper rate limit error handling - Rename cloud_provider_token_id to cloud_provider_token_uuid with deprecation - Fix prices array schema in server-types endpoint with proper items definition - Add explicit default: true to autogenerate_domain properties - Add timeout and retry options to Docker install curl commands - Fix race condition in deployment status update using atomic query
This commit is contained in:
@@ -142,11 +142,13 @@ trait ExecuteRemoteCommand
|
||||
// Now we can set the status to FAILED since all retries have been exhausted
|
||||
// But only if the deployment hasn't already been marked as FINISHED
|
||||
if (isset($this->application_deployment_queue)) {
|
||||
$this->application_deployment_queue->refresh();
|
||||
if ($this->application_deployment_queue->status !== ApplicationDeploymentStatus::FINISHED->value) {
|
||||
$this->application_deployment_queue->status = ApplicationDeploymentStatus::FAILED->value;
|
||||
$this->application_deployment_queue->save();
|
||||
}
|
||||
// Avoid clobbering a deployment that may have just been marked FINISHED
|
||||
$this->application_deployment_queue->newQuery()
|
||||
->where('id', $this->application_deployment_queue->id)
|
||||
->where('status', '!=', ApplicationDeploymentStatus::FINISHED->value)
|
||||
->update([
|
||||
'status' => ApplicationDeploymentStatus::FAILED->value,
|
||||
]);
|
||||
}
|
||||
throw $lastError;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user