From 5d2759c63c7214a587f74d6933a1b89a17382f8b Mon Sep 17 00:00:00 2001 From: Alex Tau Date: Sat, 31 May 2025 18:48:23 +0300 Subject: [PATCH] retry telegram connection forever --- src/lego_monitoring/alerting/alerts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lego_monitoring/alerting/alerts.py b/src/lego_monitoring/alerting/alerts.py index 2241b6e..dfa61a4 100644 --- a/src/lego_monitoring/alerting/alerts.py +++ b/src/lego_monitoring/alerting/alerts.py @@ -17,7 +17,7 @@ class Alert: async def get_client() -> TelegramClient: config = cvars.config.get() api_id, api_hash, bot_token = config.telegram.creds.split(",") - client = await TelegramClient(MemorySession(), api_id, api_hash).start(bot_token=bot_token) + client = await TelegramClient(MemorySession(), api_id, api_hash, connection_retries=None).start(bot_token=bot_token) client.parse_mode = "html" return client