diff --git a/app/Http/Livewire/Project/Application/DeploymentNavbar.php b/app/Http/Livewire/Project/Application/DeploymentNavbar.php index b0cad0395..0cdb895c8 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 28866083f..d42fb2298 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') - Cancel deployment + Cancel Deployment @endif