refactor: split TG worker into poller (callbacks) and sender (email summaries) threads

This commit is contained in:
earthjasonlin committed 2026-07-15 18:35:01 +08:00
1 parent 2744d9dd77
commit 2822075f2f
2 files changed
+12 -7

No files matched your search

+2 -2
View File
@@ -86,8 +86,8 @@ def poll_telegram(tg_cfg: TelegramConfig, cfg: Config, last_update_id: int) -> i
try:
resp = requests.get(
f"https://api.telegram.org/bot{tg_cfg.bot_token}/getUpdates",
params={"offset": last_update_id, "timeout": 10},
timeout=15,
params={"offset": last_update_id, "timeout": 2, "allowed_updates": ["callback_query", "message"]},
timeout=5,
)
resp.raise_for_status()
data = resp.json()