mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-17 19:21:36 +00:00
fix(restart): reset restart count when resource is manually stopped (#7784)
This commit is contained in:
@@ -55,6 +55,14 @@ class StopApplication
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,13 @@ class StopDatabase
|
||||
|
||||
$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) {
|
||||
CleanupDocker::dispatch($server, false, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user