dragonflight/services/mam-api/src
Zac Gaetano e8f91cf4b4 fix(playout): immediate failover on new channels + play 502 vs 409
- spawnChannelSidecar: set last_heartbeat_at = NOW() when flipping
  channel to 'running'. Without this, last_heartbeat_at is NULL so
  the first scheduler tick sees ageMs = (now - epoch) >> TIMEOUT_MS
  and triggers failover before the sidecar has had a single chance
  to respond.
- scheduler playoutHealthTick: when last_heartbeat_at is NULL fall
  back to updated_at as the baseline (belt-and-suspenders with the
  spawnChannelSidecar fix). Also include updated_at in the query.
- POST /channels/:id/play: catch callSidecar errors explicitly and
  return 502 Bad Gateway instead of delegating to next(err) which
  the error middleware maps to 409 Conflict.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 12:34:41 -04:00
..
ampp feat: AMPP folder sync integration — pre-create folder hierarchy on upload, expose lookup endpoint for Script Task: client.js 2026-04-18 13:42:07 -04:00
auth fix(mam-api): harden TOTP login flow + tighten Google domain check 2026-05-30 12:52:53 +00:00
db feat(mam-api): migration 029 — playout schema 2026-05-30 14:02:25 +00:00
middleware fix(playout): repair failover, authenticate scheduler self-calls, fix playlist walk + CasparCG consumer syntax 2026-05-30 14:51:35 +00:00
routes fix(playout): immediate failover on new channels + play 502 vs 409 2026-05-31 12:34:41 -04:00
s3 fix(s3): land NodeHttpHandler request/connection timeout in main 2026-05-29 17:26:59 -04:00
tasks Revert "auth: top-to-bottom rework — local accounts, RBAC + client tag, audit log, env-bootstrap" 2026-05-27 03:28:05 +00:00
index.js feat(mam-api): /playout control plane + auto-failover 2026-05-30 14:02:25 +00:00
scheduler.js fix(playout): immediate failover on new channels + play 502 vs 409 2026-05-31 12:34:41 -04:00