mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 01:35:22 +03:00
Don't run for a camera with no recording segments
This commit is contained in:
parent
ac03e842bc
commit
132274579c
@ -84,7 +84,6 @@ class StorageMaintainer(threading.Thread):
|
||||
) -> set[str]:
|
||||
"""Delete Recording Segments"""
|
||||
# loop over recordings and see if they overlap with any retained events
|
||||
# TODO: expire segments based on segment stats according to config
|
||||
event_start = 0
|
||||
deleted_recordings = set()
|
||||
for recording in recordings.objects().iterator():
|
||||
@ -140,6 +139,9 @@ class StorageMaintainer(threading.Thread):
|
||||
.limit(segment_count * 12)
|
||||
)
|
||||
|
||||
if len(recordings) == 0:
|
||||
continue
|
||||
|
||||
# cameras that are only recording part time
|
||||
# should not be forced to have 2 hours of
|
||||
# recordings disabled
|
||||
|
||||
Loading…
Reference in New Issue
Block a user