$this->moduleVmwareId, 'new_vm_id' => $this->newVmId, ]); $ctx = $rebuildService ->buildContext($this->moduleVmwareId, $this->newOsId, $this->newVmId); $addonService->reinstall($ctx); RebuildFinalizeJob::dispatch( $this->moduleVmwareId, $this->newOsId, $this->newVmId, $this->reinstallLogId, )->onQueue('default'); Log::info('RebuildAddonInstallJob: completed, finalize dispatched', [ 'module_vmware_id' => $this->moduleVmwareId, 'new_vm_id' => $this->newVmId, ]); } public function failed(Throwable $e): void { Log::error('RebuildAddonInstallJob: failed — old VM preserved', [ 'module_vmware_id' => $this->moduleVmwareId, 'new_vm_id' => $this->newVmId, 'error' => $e->getMessage(), ]); \App\Models\ReinstallLog::where('id', $this->reinstallLogId)->update([ 'status' => \App\Models\ReinstallLog::STATUS_FAILED, 'error_message' => 'AddonInstall failed: ' . $e->getMessage(), 'updated_at' => now(), ]); } }