onQueue('provisioning'); } public function handle(ProxmoxClient $proxmox): void { $hosts = Host::query() // Hosts still being onboarded, or already retired, are not a // statement about the platform's health. ->whereIn('status', ['active', 'error']) ->get(); foreach ($hosts as $host) { try { $proxmox->forHost($host)->nodeStatus($host->node); // Only the timestamp. Whether a host is "active" or "error" is // an operator's decision and a provisioning outcome — a // heartbeat must not quietly promote a host somebody has // deliberately taken out of service. $host->forceFill(['last_seen_at' => now()])->save(); } catch (Throwable) { // Deliberately silent, and deliberately not writing anything. // Absence IS the signal: healthState() reads the age of the // last successful answer, so a failure is recorded by the // timestamp not moving. Writing a failure count here would be a // second version of the same fact. } } } }