onQueue('provisioning'); } public function handle(HostLoadSeries $load): void { // The same two states PingHosts asks about: a host still being onboarded // has no token yet, and a retired one is nobody's dashboard. `error` is // included deliberately — a host in trouble is exactly the one an // operator opens the page for. $hosts = Host::query() ->whereIn('status', ['active', 'error']) ->whereNotNull('api_token_ref') ->get(); foreach ($hosts as $host) { // collect() logs its own failures and never throws: one unreachable // host must not stop the collection for the rest of the fleet. $load->collect($host); } } }