processAndPublish( $this->sessionId, $this->hash, $this->artworkId, $this->originalFileName, $this->archiveSessionId, $this->archiveHash, $this->archiveOriginalFileName, $this->additionalScreenshotSessions ); if ($this->batchItemId) { $queue->markItemMediaProcessed($this->batchItemId); } // Auto-tagging is async and must never block publish. if ((bool) config('vision.auto_tagging.enabled', false)) { AutoTagArtworkJob::dispatch($this->artworkId, $this->hash)->afterCommit(); } if ((bool) config('vision.upload.maturity.enabled', false)) { DetectArtworkMaturityJob::dispatch($this->artworkId, $this->hash)->afterCommit(); } if ((bool) config('vision.upload.embeddings.enabled', true)) { GenerateArtworkEmbeddingJob::dispatch($this->artworkId, $this->hash)->afterCommit(); } if ((bool) config('vision.upload.ai_assist.enabled', false)) { AnalyzeArtworkAiAssistJob::dispatch($this->artworkId)->afterCommit(); } } public function failed(\Throwable $exception): void { if (! $this->batchItemId) { return; } app(UploadQueueService::class)->markItemFailed( $this->batchItemId, 'derivatives_failed', $exception->getMessage() ); } }