fix: move restart count reset logic to the correct position in the restart method
This commit is contained in:
parent
cefb425492
commit
761f177b1e
1 changed files with 7 additions and 7 deletions
|
|
@ -157,13 +157,6 @@ public function restart()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset restart count on manual restart
|
|
||||||
$this->application->update([
|
|
||||||
'restart_count' => 0,
|
|
||||||
'last_restart_at' => now(),
|
|
||||||
'last_restart_type' => 'manual',
|
|
||||||
]);
|
|
||||||
|
|
||||||
$this->setDeploymentUuid();
|
$this->setDeploymentUuid();
|
||||||
$result = queue_application_deployment(
|
$result = queue_application_deployment(
|
||||||
application: $this->application,
|
application: $this->application,
|
||||||
|
|
@ -176,6 +169,13 @@ public function restart()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reset restart count on manual restart
|
||||||
|
$this->application->update([
|
||||||
|
'restart_count' => 0,
|
||||||
|
'last_restart_at' => now(),
|
||||||
|
'last_restart_type' => 'manual',
|
||||||
|
]);
|
||||||
|
|
||||||
return $this->redirectRoute('project.application.deployment.show', [
|
return $this->redirectRoute('project.application.deployment.show', [
|
||||||
'project_uuid' => $this->parameters['project_uuid'],
|
'project_uuid' => $this->parameters['project_uuid'],
|
||||||
'application_uuid' => $this->parameters['application_uuid'],
|
'application_uuid' => $this->parameters['application_uuid'],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue