weldLogId = $weldLogId; $this->onQueue('save-trigger'); } /** * Execute the job. */ public function handle(): void { Log::info("=== ExecuteMaterialGroupUpdaterJob STARTED ===", [ 'weld_log_id' => $this->weldLogId, 'timestamp' => now(), ]); try { if (function_exists('materialGroupUpdater')) { $result = materialGroupUpdater($this->weldLogId); Log::info("ExecuteMaterialGroupUpdaterJob completed", [ 'weld_log_id' => $this->weldLogId, 'result' => $result, ]); } else { Log::warning("materialGroupUpdater function not found", [ 'weld_log_id' => $this->weldLogId, ]); } } catch (\Throwable $th) { Log::error("ExecuteMaterialGroupUpdaterJob failed", [ 'weld_log_id' => $this->weldLogId, 'error' => $th->getMessage(), 'trace' => $th->getTraceAsString() ]); throw $th; } Log::info("=== ExecuteMaterialGroupUpdaterJob COMPLETED ===", [ 'weld_log_id' => $this->weldLogId, 'timestamp' => now(), ]); } /** * Get the tags that should be assigned to the job. */ public function tags(): array { return [ "MaterialGroupUpdater", "WeldLog:{$this->weldLogId}", ]; } }