mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-17 21:58:22 +03:00
don't try to run cleanup if frigate is in safe mode
This commit is contained in:
parent
3ec2305e6a
commit
835792e7b9
@ -324,6 +324,10 @@ class EventCleanup(threading.Thread):
|
||||
return events_to_update
|
||||
|
||||
def run(self) -> None:
|
||||
if self.config.safe_mode:
|
||||
logger.info("Safe mode enabled, skipping event cleanup")
|
||||
return
|
||||
|
||||
# only expire events every 5 minutes
|
||||
while not self.stop_event.wait(300):
|
||||
events_with_expired_clips = self.expire_clips()
|
||||
|
||||
@ -350,6 +350,10 @@ class RecordingCleanup(threading.Thread):
|
||||
logger.debug("End expire recordings.")
|
||||
|
||||
def run(self) -> None:
|
||||
if self.config.safe_mode:
|
||||
logger.info("Safe mode enabled, skipping recording cleanup")
|
||||
return
|
||||
|
||||
# on startup sync recordings with disk if enabled
|
||||
if self.config.record.sync_recordings:
|
||||
sync_recordings(limited=False)
|
||||
|
||||
@ -272,6 +272,10 @@ class StorageMaintainer(threading.Thread):
|
||||
|
||||
def run(self):
|
||||
"""Check every 5 minutes if storage needs to be cleaned up."""
|
||||
if self.config.safe_mode:
|
||||
logger.info("Safe mode enabled, skipping storage maintenance")
|
||||
return
|
||||
|
||||
self.calculate_camera_bandwidth()
|
||||
while not self.stop_event.wait(300):
|
||||
if not self.camera_storage_stats or True in [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user