perf: reduce poll timeout to 1s and wait to 50ms for faster button response
This commit is contained in:
1 parent
c26d8aa294
commit
5ca739456d
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -86,7 +86,7 @@ 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": 2},
|
||||
params={"offset": last_update_id, "timeout": 1},
|
||||
timeout=10,
|
||||
)
|
||||
resp.raise_for_status()
|
||||
|
||||
Reference in new issue
Block a user