Skip to content

feat: VOD recording recovery for orphaned streams (#552)#570

Merged
filthyrake merged 1 commit intodevfrom
feat/vod-recovery-mechanism-552
Feb 7, 2026
Merged

feat: VOD recording recovery for orphaned streams (#552)#570
filthyrake merged 1 commit intodevfrom
feat/vod-recovery-mechanism-552

Conversation

@filthyrake
Copy link
Owner

Summary

  • Adds background recovery loop that detects streams stuck in ended state with auto_record_vod=true and vod_video_id IS NULL, and retries VOD creation
  • Adds 3 config variables: LIVE_VOD_RECOVERY_INTERVAL (120s), LIVE_VOD_RECOVERY_GRACE_PERIOD (300s), LIVE_VOD_RECOVERY_MAX_RETRIES (5)
  • In-memory retry tracking per stream, with max retries and one-time error log at exhaustion
  • Addresses Copilot PR review feedback from fix: Verify stream state before triggering VOD recording (#552) #569: wraps re-fetch in try/except, uses original auto_record_vod flag for VOD decision
  • Adds (id=...) to VOD error log messages for easier debugging

Test plan

  • 12 unit tests in tests/test_vod_recovery.py all pass
  • Verify recovery loop starts/stops with background tasks
  • Verify orphaned streams get VOD created after grace period
  • Verify streams at max retries are skipped

🤖 Generated with Claude Code

Add background recovery loop that detects streams stuck in 'ended' state
without a VOD recording and retries creation. Also addresses Copilot review
feedback: wrap re-fetch in try/except to avoid aborting stale detection for
other streams, and use original auto_record_vod flag for VOD decision.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@filthyrake filthyrake merged commit 6e83468 into dev Feb 7, 2026
2 of 3 checks passed
@filthyrake filthyrake deleted the feat/vod-recovery-mechanism-552 branch February 7, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments