dragonflight/services/mam-api
ZGaetano 1ca295d799 fix: upload growing file to S3 on stop so proxy job succeeds
When growing_enabled=true the capture container writes the master to
/growing/{projectId}/{clipName}.{ext} instead of streaming it to S3.
The capture container's graceful-shutdown handler (running during the
Docker stop) calls POST /assets/:id/finalize with the expected S3 key,
which queues a proxy job.  That key never had data in S3 so the proxy
worker downloaded an empty object and failed with 'unable to open file'.

Fix: in the stop endpoint, after the container has exited (meaning
ffmpeg has finished flushing the growing file), upload the growing file
to S3 from the mam-api node (which has /growing mounted).  The upload
completes before the HTTP response is sent, so by the time the client
refreshes and the BullMQ worker dequeues the proxy job the S3 object
exists.

Also handles the edge case where finalize already ran and flipped the
asset to 'processing' — we still do the upload so the already-queued
proxy job can succeed.  Best-effort: a missing growing file (empty
recording or SMB-path scenario) is logged but does not fail the stop."
2026-05-31 19:30:13 -04:00
..
src fix: upload growing file to S3 on stop so proxy job succeeds 2026-05-31 19:30:13 -04:00
test fix(mam-api): harden TOTP login flow + tighten Google domain check 2026-05-30 12:52:53 +00:00
.env.example add services/mam-api/.env.example 2026-04-07 21:58:24 -04:00
.gitignore add services/mam-api/.gitignore 2026-04-07 21:58:24 -04:00
Dockerfile feat: SDK deployment UI, proxy encoding global settings, S3 env fallback 2026-05-23 02:58:32 +00:00
package-lock.json fix(mam-api): TRUST_PROXY boot warning + CSRF integration tests + bounded rate-limit map 2026-05-27 15:03:35 -04:00
package.json feat(mam-api,web-ui): Google OAuth (OIDC) sign-in 2026-05-30 02:51:59 +00:00