Add safe config fallbacks for app init and health checks
This commit is contained in:
2
app.py
2
app.py
@@ -15,7 +15,7 @@ else:
|
||||
|
||||
paths_cfg = cfg.get("paths", {})
|
||||
runtime_state.configure(paths_cfg.get("runtime_state", "/var/server-bot/runtime.json"))
|
||||
ARTIFACT_STATE = paths_cfg["artifact_state"]
|
||||
ARTIFACT_STATE = paths_cfg.get("artifact_state", "/opt/tg-bot/state.json")
|
||||
RESTIC_ENV = load_env(paths_cfg.get("restic_env", "/etc/restic/restic.env"))
|
||||
|
||||
DISK_WARN = int(cfg.get("thresholds", {}).get("disk_warn", 80))
|
||||
|
||||
Reference in New Issue
Block a user