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

This commit is contained in:
2026-07-15 18:35:01 +08:00
parent 2744d9dd77
commit 2822075f2f
2 changed files with 12 additions and 7 deletions

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()