改进 计划任务
This commit is contained in:
parent
8198335af6
commit
927377b820
@ -41,10 +41,13 @@ public function handle(): void
|
|||||||
if ($response['status'] === 200) {
|
if ($response['status'] === 200) {
|
||||||
$host->update(Arr::except($response['json'], ['id', 'user_id', 'module_id', 'created_at', 'updated_at']));
|
$host->update(Arr::except($response['json'], ['id', 'user_id', 'module_id', 'created_at', 'updated_at']));
|
||||||
} else if ($response['status'] === 404) {
|
} else if ($response['status'] === 404) {
|
||||||
Log::warning($host->module->name . ' ' . $host->name . ' ' . $host->id . ' 不存在,标记为不可用。');
|
if ($host->status !== 'unavailable') {
|
||||||
|
Log::warning($host->module->name . ' ' . $host->name . ' ' . $host->id . ' 不存在,标记为不可用。');
|
||||||
|
$host->status = 'unavailable';
|
||||||
|
$host->save();
|
||||||
|
}
|
||||||
// dispatch(new HostJob($host, 'delete'));
|
// dispatch(new HostJob($host, 'delete'));
|
||||||
$host->status = 'unavailable';
|
|
||||||
$host->save();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user