From 0d8349fdd962328a2359a284da922184c8dcc871 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Mon, 30 Jan 2023 15:45:09 -0700 Subject: [PATCH] Make names more clear --- frigate/app.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frigate/app.py b/frigate/app.py index 95ffafb23..1c429c334 100644 --- a/frigate/app.py +++ b/frigate/app.py @@ -331,17 +331,17 @@ class FrigateApp: self.frigate_watchdog.start() def check_shm(self) -> None: - current_shm = round(shutil.disk_usage("/dev/shm").total / 1000000, 1) - calculated_shm = 30 + available_shm = round(shutil.disk_usage("/dev/shm").total / 1000000, 1) + min_req_shm = 30 for _, camera in self.config.cameras.items(): - calculated_shm += round( + min_req_shm += round( (camera.detect.width * camera.detect.height * 1.5 * 9 + 270480) / 1048576, 1, ) - if calculated_shm < current_shm: + if available_shm < min_req_shm logger.warning( f"The current SHM size of {current_shm}MB is too small, recommend increasing it to at least {calculated_shm}MB." )