mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-02 17:25: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]:
|
) -> set[str]:
|
||||||
"""Delete Recording Segments"""
|
"""Delete Recording Segments"""
|
||||||
# loop over recordings and see if they overlap with any retained events
|
# 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
|
event_start = 0
|
||||||
deleted_recordings = set()
|
deleted_recordings = set()
|
||||||
for recording in recordings.objects().iterator():
|
for recording in recordings.objects().iterator():
|
||||||
@ -140,6 +139,9 @@ class StorageMaintainer(threading.Thread):
|
|||||||
.limit(segment_count * 12)
|
.limit(segment_count * 12)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if len(recordings) == 0:
|
||||||
|
continue
|
||||||
|
|
||||||
# cameras that are only recording part time
|
# cameras that are only recording part time
|
||||||
# should not be forced to have 2 hours of
|
# should not be forced to have 2 hours of
|
||||||
# recordings disabled
|
# recordings disabled
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user