refactor(deployment): streamline next deployment queuing logic by repositioning queue_next_deployment call
This commit is contained in:
@@ -2457,8 +2457,6 @@ COPY ./nginx.conf /etc/nginx/conf.d/default.conf");
|
||||
|
||||
private function next(string $status)
|
||||
{
|
||||
queue_next_deployment($this->application);
|
||||
|
||||
// Never allow changing status from FAILED or CANCELLED_BY_USER to anything else
|
||||
if ($this->application_deployment_queue->status === ApplicationDeploymentStatus::FAILED->value) {
|
||||
$this->application->environment->project->team?->notify(new DeploymentFailed($this->application, $this->deployment_uuid, $this->preview));
|
||||
@@ -2473,6 +2471,8 @@ COPY ./nginx.conf /etc/nginx/conf.d/default.conf");
|
||||
'status' => $status,
|
||||
]);
|
||||
|
||||
queue_next_deployment($this->application);
|
||||
|
||||
if ($status === ApplicationDeploymentStatus::FINISHED->value) {
|
||||
if (! $this->only_this_server) {
|
||||
$this->deploy_to_additional_destinations();
|
||||
|
||||
Reference in New Issue
Block a user