recorders: /live HLS cleanup + orphan reaper #7

Closed
opened 2026-05-18 10:27:29 -04:00 by zgaetano · 0 comments
Owner

Resolved in commit 1afb150.

Added POST /assets/cleanup-live-orphans:

  • Reads every directory under /live/<uuid>/.
  • Cross-references each UUID with the assets table.
  • Deletes dirs that have no matching DB row (regardless of status — archived assets keep their HLS scrubber).
  • Returns {reaped, kept, dirs}.

Verified on deploy: 6 orphan dirs cleaned, 0 kept (no DB-backed live assets at the time of the run).

Not wired to a cron yet; intended as an on-demand cleanup the UI can expose under Settings → Storage in a follow-up, or the operator can hit directly:

curl -X POST http://localhost:47432/api/v1/assets/cleanup-live-orphans

Closed; the auto-reap-on-recorder-shutdown side of this lives in #17.

Resolved in commit 1afb150. Added `POST /assets/cleanup-live-orphans`: - Reads every directory under `/live/<uuid>/`. - Cross-references each UUID with the `assets` table. - Deletes dirs that have no matching DB row (regardless of status — archived assets keep their HLS scrubber). - Returns `{reaped, kept, dirs}`. Verified on deploy: 6 orphan dirs cleaned, 0 kept (no DB-backed live assets at the time of the run). Not wired to a cron yet; intended as an on-demand cleanup the UI can expose under Settings → Storage in a follow-up, or the operator can hit directly: curl -X POST http://localhost:47432/api/v1/assets/cleanup-live-orphans Closed; the auto-reap-on-recorder-shutdown side of this lives in #17.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: WildDragonLLC/dragonflight#7
No description provided.