Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix: cancel any deployments + queue next

Andras Bacsai5d95d8b79a08
diff --git a/app/Http/Livewire/Project/Application/DeploymentNavbar.php b/app/Http/Livewire/Project/Application/DeploymentNavbar.php
index b0cad0395f..0cdb895c87 100644
--- a/app/Http/Livewire/Project/Application/DeploymentNavbar.php
+++ b/app/Http/Livewire/Project/Application/DeploymentNavbar.php
@@ -60,12 +60,16 @@ class DeploymentNavbar extends Component
$previous_logs[] = $new_log_entry;
$this->application_deployment_queue->update([
'logs' => json_encode($previous_logs, flags: JSON_THROW_ON_ERROR),
- 'current_process_id' => null,
- 'status' => ApplicationDeploymentStatus::CANCELLED_BY_USER->value,
]);
}
} catch (\Throwable $e) {
return handleError($e, $this);
+ } finally {
+ $this->application_deployment_queue->update([
+ 'current_process_id' => null,
+ 'status' => ApplicationDeploymentStatus::CANCELLED_BY_USER->value,
+ ]);
+ queue_next_deployment($this->application);
}
}
}
diff --git a/resources/views/livewire/project/application/deployment-navbar.blade.php b/resources/views/livewire/project/application/deployment-navbar.blade.php
index 28866083f7..d42fb22987 100644
--- a/resources/views/livewire/project/application/deployment-navbar.blade.php
+++ b/resources/views/livewire/project/application/deployment-navbar.blade.php
@@ -7,6 +7,6 @@
@endif
@if (data_get($application_deployment_queue, 'status') === 'in_progress' ||
data_get($application_deployment_queue, 'status') === 'queued')
- <x-forms.button wire:click.prevent="cancel">Cancel deployment</x-forms.button>
+ <x-forms.button wire:click.prevent="cancel">Cancel Deployment</x-forms.button>
@endif
</div>