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