From d7ef31d05e907b455efe8fdd26fe76e7496bb74c Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Sun, 25 Sep 2022 11:30:09 -0600 Subject: [PATCH] Round segment size --- frigate/record.py | 2 +- frigate/storage.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frigate/record.py b/frigate/record.py index 6064154ff..05ef2145f 100644 --- a/frigate/record.py +++ b/frigate/record.py @@ -285,7 +285,7 @@ class RecordingMaintainer(threading.Thread): ) try: - segment_size = float(os.path.getsize(file_path)) / 1000000 + segment_size = round(float(os.path.getsize(file_path)) / 1000000, 1) except OSError: segment_size = 0 diff --git a/frigate/storage.py b/frigate/storage.py index 568d989ad..54a351f3a 100644 --- a/frigate/storage.py +++ b/frigate/storage.py @@ -148,7 +148,7 @@ class StorageMaintainer(threading.Thread): def run(self): # Check storage consumption every 5 minutes - while not self.stop_event.wait(20): + while not self.stop_event.wait(300): if not self.avg_segment_sizes: self.calculate_camera_segment_sizes()