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;")
|
db.execute_sql("VACUUM;")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open("/config/.vacuum", "w") as f:
|
with open(f"{CONFIG_DIR}/.vacuum", "w") as f:
|
||||||
f.write(str(datetime.datetime.now().timestamp()))
|
f.write(str(datetime.datetime.now().timestamp()))
|
||||||
except PermissionError:
|
except PermissionError:
|
||||||
logger.error("Unable to write to /config to save DB state")
|
logger.error("Unable to write to /config to save DB state")
|
||||||
@ -193,8 +193,8 @@ class FrigateApp:
|
|||||||
router.run()
|
router.run()
|
||||||
|
|
||||||
# check if vacuum needs to be run
|
# check if vacuum needs to be run
|
||||||
if os.path.exists("/config/.vacuum"):
|
if os.path.exists(f"{CONFIG_DIR}/.vacuum"):
|
||||||
with open("/config/.vacuum") as f:
|
with open(f"{CONFIG_DIR}/.vacuum") as f:
|
||||||
try:
|
try:
|
||||||
timestamp = int(f.readline())
|
timestamp = int(f.readline())
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user