mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-08 22:24:37 +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:
@@ -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