fix: pass USE_CELERY_FALLBACK to containers and show real error in failure UI

- docker-compose.yml: add USE_CELERY_FALLBACK env var to api and worker
  services so cloud_run_dispatch uses Celery on optical-dev
- JobDetail.tsx: show actual error message instead of generic
  "Processing failed at ." when failure step is unknown; also show
  job.error string when no structured failure object exists

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vadym Samoilenko 2026-04-30 17:48:02 +01:00
parent 37873c433d
commit 5db01248b6
2 changed files with 13 additions and 4 deletions

View file

@ -139,6 +139,9 @@ services:
COST_TRACKER_API_KEY: ${COST_TRACKER_API_KEY:-}
COST_TRACKER_SOURCE_APP: ${COST_TRACKER_SOURCE_APP:-video-accessibility}
COST_TRACKER_ENABLED: ${COST_TRACKER_ENABLED:-true}
# Pipeline dispatch mode
USE_CELERY_FALLBACK: ${USE_CELERY_FALLBACK:-false}
volumes:
- ./secrets:/secrets:ro
- api-logs:/app/logs
@ -179,6 +182,7 @@ services:
# When set, CPU-intensive operations are offloaded to Cloud Run
WHISPER_SERVICE_URL: ${WHISPER_SERVICE_URL:-}
FFMPEG_SERVICE_URL: ${FFMPEG_SERVICE_URL:-}
USE_CELERY_FALLBACK: ${USE_CELERY_FALLBACK:-false}
# Auth (required by Settings class even though worker doesn't use it)
JWT_SECRET: ${JWT_SECRET}

View file

@ -87,10 +87,13 @@ const ProgressIndicator = ({ status, failure }: { status: string; failure?: JobF
</div>
))}
</div>
<div className="mt-3 pt-3 border-t border-gray-200">
<p className="text-xs text-red-600">
Processing failed at {failedStepLabel}. Check error details for more information.
<div className="mt-3 pt-3 border-t border-gray-200 space-y-1">
<p className="text-xs text-red-600 font-medium">
{failedStepLabel ? `Failed at: ${failedStepLabel}` : 'Processing failed'}
</p>
{failure?.message && (
<p className="text-xs text-red-500 break-words">{failure.message}</p>
)}
</div>
</div>
);
@ -706,7 +709,9 @@ export function JobDetail() {
? 'TTS generation failed. Fix audio description text before retrying.'
: job.status === 'render_failed'
? 'Video rendering failed.'
: 'Processing failed.'}
: job.error
? job.error
: 'Processing failed. Retry or escalate to support.'}
</p>
)}
<div className="flex gap-2">