mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-12 20:15:36 +00:00
feat(application): preserve crash restart limit status
Stop applications after they hit the crash restart limit without clearing restart tracking, surface the stopped-limit warning in status UI, and use the application link in restart limit notifications.
This commit is contained in:
1 parent
d581abb284
commit
aaa540421f
7 files changed
+128
-13
No files matched your search
@@ -572,6 +572,15 @@ class Application extends BaseModel
|
||||
return null;
|
||||
}
|
||||
|
||||
public function stoppedAfterRestartLimit(): bool
|
||||
{
|
||||
return str($this->status)->startsWith('exited')
|
||||
&& ($this->restart_count ?? 0) > 0
|
||||
&& ($this->max_restart_count ?? 0) > 0
|
||||
&& $this->restart_count >= $this->max_restart_count
|
||||
&& $this->last_restart_type === 'crash';
|
||||
}
|
||||
|
||||
public function taskLink($task_uuid)
|
||||
{
|
||||
if (data_get($this, 'environment.project.uuid')) {
|
||||
|
||||
Reference in new issue
Block a user