From ec8f8d5b794d95c29189247c82dd08bbef5128fd Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Thu, 8 Jun 2023 09:06:30 -0600 Subject: [PATCH] Use consts --- frigate/app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frigate/app.py b/frigate/app.py index 1ec476060..840b80710 100644 --- a/frigate/app.py +++ b/frigate/app.py @@ -172,7 +172,7 @@ class FrigateApp: db.execute_sql("VACUUM;") try: - with open("/config/.vacuum", "w") as f: + with open(f"{CONFIG_DIR}/.vacuum", "w") as f: f.write(str(datetime.datetime.now().timestamp())) except PermissionError: logger.error("Unable to write to /config to save DB state") @@ -193,8 +193,8 @@ class FrigateApp: router.run() # check if vacuum needs to be run - if os.path.exists("/config/.vacuum"): - with open("/config/.vacuum") as f: + if os.path.exists(f"{CONFIG_DIR}/.vacuum"): + with open(f"{CONFIG_DIR}/.vacuum") as f: try: timestamp = int(f.readline()) except Exception: