改进 主机错误删除
This commit is contained in:
parent
f560f03e77
commit
86c0d3db5b
@ -52,6 +52,13 @@ public function handle(): void
|
||||
return;
|
||||
}
|
||||
|
||||
// 如果主机状态为 error 并且上次更新时间超过 7 天,则删除主机
|
||||
if ($host->status === 'error' && $host->updated_at->lt(now()->subDays(7))) {
|
||||
$host->delete();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$host->load(['module']);
|
||||
|
||||
if (! $host->module->isUp()) {
|
||||
|
Loading…
Reference in New Issue
Block a user