Fix FFmpeg worker: align job data format with API and update content status

The worker was completely broken because of 4 mismatches with the API:

1. Field names: API sends {correlationId, inputKey, outputKey, inputBucket,
   outputBucket} but worker expected {contentId, sourceKey, outputPrefix}.
   All fields were undefined, so jobs silently failed.

2. No status callback: Worker never updated content status to 'completed',
   so projects never appeared as published (content stuck in 'processing').
   Now updates status directly in PostgreSQL.

3. Wrong bucket: Worker uploaded HLS to private bucket, but the stream
   controller checks the public bucket. Now uploads to outputBucket (public).

4. Wrong manifest name: Worker output index.m3u8 but codebase expects
   file.m3u8. Aligned with helper.ts convention.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Dorian
2026-02-13 21:07:24 +00:00
parent f6c4b9f06c
commit 7f78ac9ba6
2 changed files with 94 additions and 31 deletions

View File

@@ -179,7 +179,7 @@ services:
context: ./backend
dockerfile: Dockerfile.ffmpeg
args:
CACHEBUST: "9"
CACHEBUST: "12"
restart: unless-stopped
environment:
ENVIRONMENT: production