Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Periodically sync for stale recordings #8433

Merged
merged 2 commits into from
Nov 4, 2023
Merged

Conversation

NickM-27
Copy link
Sponsor Collaborator

@NickM-27 NickM-27 commented Nov 2, 2023

This PR accomplishes the following:

  1. adds a schedule to run recordings sync once a week
  2. previously only the DB was cleaned up, but now stale recordings files without a DB entry will also be cleaned up

Copy link

netlify bot commented Nov 2, 2023

Deploy Preview for frigate-docs canceled.

Name Link
🔨 Latest commit 5bd45cf
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/6544e994e6e3450008baba53

@NickM-27 NickM-27 changed the title Periodically cleanup recordings Periodically cleanup stale recordings Nov 2, 2023
@NickM-27 NickM-27 changed the title Periodically cleanup stale recordings Periodically sync for stale recordings Nov 2, 2023
@blakeblackshear
Copy link
Owner

This is still likely to overwhelm many users setups.

A couple ideas to consider:

  • Do it in batches. Maybe just check one day of recordings per loop.
  • Slow it down intentionally with pause statements to create more space for other threads.
  • Add a config option and make it disabled by default.
  • Log warning messages and ask for users to report since this really shouldn't be happening.

@blakeblackshear blakeblackshear merged commit 63233a5 into dev Nov 4, 2023
13 checks passed
@blakeblackshear blakeblackshear deleted the periodic-cleanup branch November 4, 2023 02:21
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.

None yet

2 participants