host = $host; } /** * Execute the job. * * @return void */ public function handle(): void { $host = $this->host; $response = $host->module->baseRequest('get', 'hosts/' . $host->id); if ($response['status'] === 200) { $host->update(Arr::except($response['json'], ['id', 'user_id', 'module_id', 'created_at', 'updated_at'])); } else if ($response['status'] === 404) { Log::warning($host->module->name . ' ' . $host->name . ' ' . $host->id . ' 不存在,标记为暂停。'); dispatch(new HostJob($host, 'delete')); } } }