serialNo = $serialNo; $this->data = $data; } /** * Execute the job. */ public function handle(MachineService $machineService): void { try { $machineService->updateHeartbeat($this->serialNo, $this->data); } catch (\Exception $e) { Log::error("Failed to process heartbeat for machine {$this->serialNo}: " . $e->getMessage()); throw $e; } } }