mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 01:35:22 +03:00
Add log message when discarding recording segments in cache
Currently Frigate silently discards recording segments in cache if there's more than "keep_count" for a camera, which can happen on high load/busy/slow systems. This results in recording segments being lost with no apparent cause in the logs (even when set to debug). This PR adds a warning log entry when discarding segments, in the same way as discarding corrupted segments
This commit is contained in:
parent
b36b63599b
commit
73f2c827c6
@ -102,6 +102,7 @@ class RecordingMaintainer(threading.Thread):
|
||||
if len(grouped_recordings[camera]) > keep_count:
|
||||
to_remove = grouped_recordings[camera][:-keep_count]
|
||||
for f in to_remove:
|
||||
logger.warning(f"Discarding a recording segment: {f}")
|
||||
Path(f["cache_path"]).unlink(missing_ok=True)
|
||||
self.end_time_cache.pop(f["cache_path"], None)
|
||||
grouped_recordings[camera] = grouped_recordings[camera][-keep_count:]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user