Skip to content

Commit

Permalink
revert false warning messages
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeblackshear committed Jul 20, 2022
1 parent ed1897d commit 3c46a33
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions frigate/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,19 @@ def move_files(self):
for camera in grouped_recordings.keys():
segment_count = len(grouped_recordings[camera])
if segment_count > keep_count:
logger.warning(
f"Too many recording segments in cache for {camera}. Keeping the {keep_count} most recent segments out of {segment_count}, discarding the rest..."
)
####
# Need to find a way to tell if these are aging out based on retention settings or if the system is overloaded.
####
# logger.warning(
# f"Too many recording segments in cache for {camera}. Keeping the {keep_count} most recent segments out of {segment_count}, discarding the rest..."
# )
to_remove = grouped_recordings[camera][:-keep_count]
for f in to_remove:
cache_path = f["cache_path"]
logger.warning(f"Discarding a recording segment: {cache_path}")
####
# Need to find a way to tell if these are aging out based on retention settings or if the system is overloaded.
####
# logger.warning(f"Discarding a recording segment: {cache_path}")
Path(cache_path).unlink(missing_ok=True)
self.end_time_cache.pop(cache_path, None)
grouped_recordings[camera] = grouped_recordings[camera][-keep_count:]
Expand Down

0 comments on commit 3c46a33

Please sign in to comment.