feat(client): add watchdog and disconnect flap handling

Introduce an active watchdog that probes the Telegram client to detect
zombie sessions and restart them in‑process. Add configurable disconnect
flap detection with a sliding window to trigger restarts after repeated
disconnects. New environment variables and config entries are added, and
the Kurigram dependency is now version‑pinned.
This commit is contained in:
vvzvlad
2026-06-04 19:02:09 +03:00
parent 577093b9fa
commit 79b127d406
5 changed files with 162 additions and 30 deletions
+8 -1
View File
@@ -20,4 +20,11 @@ def get_settings():
"show_post_flags": True,
"proxy": None,
"trusted_proxies": [],
}
"tg_watchdog_enabled": True,
"tg_watchdog_interval": 60,
"tg_watchdog_timeout": 10,
"tg_watchdog_failures": 3,
"tg_watchdog_restart_timeout": 90,
"tg_disconnect_flap_limit": 3,
"tg_disconnect_flap_window": 120,
}