Commit 5854d283 authored by Mahmoud Aglan's avatar Mahmoud Aglan

Free app_name on failure too, not just on delete

Failed provisioning now appends '-failed-{timestamp}' to app_name,
freeing it for retry without manual cleanup.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent c86f9f6d
......@@ -53,6 +53,7 @@ public function provision(Client $client, Plan $plan, array $data, ?callable $on
} catch (\Throwable $e) {
$instance->update([
'status' => 'failed',
'app_name' => $instance->app_name . '-failed-' . now()->timestamp,
'caprover_deploy_log' => $e->getMessage(),
]);
throw new RuntimeException("Provisioning failed: {$e->getMessage()}", 0, $e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment