mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 10:45:21 +03:00
Use consts
This commit is contained in:
parent
a6c2e58833
commit
ec8f8d5b79
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user