mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-02-09 00:17:00 +01:00
sync recordings with disk once on startup
This commit is contained in:
parent
4ab0927de8
commit
689af4ff87
@ -443,6 +443,9 @@ class RecordingCleanup(threading.Thread):
|
||||
logger.debug("End sync recordings.")
|
||||
|
||||
def run(self):
|
||||
# on startup sync recordings with disk
|
||||
self.sync_recordings()
|
||||
|
||||
# Expire tmp clips every minute, recordings and clean directories every hour.
|
||||
for counter in itertools.cycle(range(60)):
|
||||
if self.stop_event.wait(60):
|
||||
@ -454,4 +457,3 @@ class RecordingCleanup(threading.Thread):
|
||||
self.expire_recordings()
|
||||
self.expire_files()
|
||||
remove_empty_directories(RECORD_DIR)
|
||||
self.sync_recordings()
|
||||
|
Loading…
Reference in New Issue
Block a user