video-accessibility/backend/app/tasks
Vadym Samoilenko b3ace22009 feat(infra): move heavy workers to Cloud Run Jobs
Heavy pipeline tasks (ingest, translate, render, rerender) now dispatch
to a Cloud Run Job (va-worker) instead of local Celery workers. optical-dev
runs only api + lightweight worker (notify/embed) within its 2-CPU budget.

- backend/app/tasks/runner.py — Cloud Run Job entrypoint
- backend/app/services/cloud_run_dispatch.py — replaces .delay() for heavy tasks
- backend/Dockerfile.cloudrun — Cloud Run worker image (ffmpeg included)
- docker-compose.optical-dev.yml — 2-CPU safe overrides, disables heavy workers
- cloudbuild.yaml — builds va-worker image and updates Cloud Run Job
- deploy-dev.sh — uses 3-file compose, builds only api+worker locally
- routes_jobs, routes_admin_production, ingest_and_ai, translate_and_synthesize
  — all dispatch sites updated to use cloud_run_dispatch.dispatch()

USE_CELERY_FALLBACK=true in .env.local to use Celery locally during dev.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-29 21:47:10 +01:00
..
__init__.py feat: per-client glossary — hybrid exact/vector retrieval + AI injection 2026-04-29 13:03:38 +01:00
_websocket_bridge.py refactor: extract broadcast_status_update to shared _websocket_bridge (H-08) 2026-04-29 14:14:57 +01:00
embed_glossary.py feat: two-stage QC (linguist→reviewer), project picker, comments, email notifications, deadlines 2026-04-29 16:59:40 +01:00
ffmpeg_operations.py feat: add dedicated ffmpeg queue to prevent server overload 2025-12-26 17:56:23 -06:00
ingest_and_ai.py feat(infra): move heavy workers to Cloud Run Jobs 2026-04-29 21:47:10 +01:00
notify.py feat(pr4+pr5): hotkeys, unified status labels, upload size constant 2026-04-29 18:42:03 +01:00
render_accessible_video.py feat(mt-14): gcs_prefix on Job, gcs_path helper, rewrite path sites 2026-04-29 20:45:12 +01:00
rerender_accessible_video.py feat(mt-14): gcs_prefix on Job, gcs_path helper, rewrite path sites 2026-04-29 20:45:12 +01:00
runner.py feat(infra): move heavy workers to Cloud Run Jobs 2026-04-29 21:47:10 +01:00
translate_and_synthesize.py feat(infra): move heavy workers to Cloud Run Jobs 2026-04-29 21:47:10 +01:00
tts_synthesis.py feat: replace SDK with direct HTTP integration to centralized cost tracker 2026-04-27 13:36:15 +01:00
whisper_transcribe.py fix: add authentication for Cloud Run service calls 2026-01-02 11:41:07 -06:00