fix(restart): reset restart count when resource is manually stopped (#7784)
This commit is contained in:
commit
083d745d70
2 changed files with 15 additions and 0 deletions
|
|
@ -55,6 +55,14 @@ public function handle(Application $application, bool $previewDeployments = fals
|
||||||
return $e->getMessage();
|
return $e->getMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reset restart tracking when application is manually stopped
|
||||||
|
$application->update([
|
||||||
|
'restart_count' => 0,
|
||||||
|
'last_restart_at' => null,
|
||||||
|
'last_restart_type' => null,
|
||||||
|
]);
|
||||||
|
|
||||||
ServiceStatusChanged::dispatch($application->environment->project->team->id);
|
ServiceStatusChanged::dispatch($application->environment->project->team->id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,13 @@ public function handle(StandaloneRedis|StandalonePostgresql|StandaloneMongodb|St
|
||||||
|
|
||||||
$this->stopContainer($database, $database->uuid, 30);
|
$this->stopContainer($database, $database->uuid, 30);
|
||||||
|
|
||||||
|
// Reset restart tracking when database is manually stopped
|
||||||
|
$database->update([
|
||||||
|
'restart_count' => 0,
|
||||||
|
'last_restart_at' => null,
|
||||||
|
'last_restart_type' => null,
|
||||||
|
]);
|
||||||
|
|
||||||
if ($dockerCleanup) {
|
if ($dockerCleanup) {
|
||||||
CleanupDocker::dispatch($server, false, false);
|
CleanupDocker::dispatch($server, false, false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue