onQueue('tracking'); } public function handle(): void { try { TrackingExport::create([ 'device_id' => $this->deviceId, 'meme_id' => $this->memeId, 'meme_media_id' => $this->memeMediaId, 'background_media_id' => $this->backgroundMediaId, 'caption_texts' => $this->captionTexts, 'export_status' => 'initiated', 'action_at' => $this->actionAt, 'user_agent' => $this->userAgent, 'ip_address' => $this->ipAddress, 'platform' => $this->platform, ]); } catch (\Exception $e) { Log::error('Failed to track export', [ 'device_id' => $this->deviceId, 'meme_id' => $this->memeId, 'error' => $e->getMessage(), ]); throw $e; } } public function failed(\Throwable $exception): void { Log::error('TrackExportJob failed permanently', [ 'device_id' => $this->deviceId, 'meme_id' => $this->memeId, 'exception' => $exception->getMessage(), ]); } }