mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-31 08:13:11 +03:00
- Wrap the getUpdates request pool to record completed round trips, since a healthy long poll completes one every ~10s even with no traffic - Replace the idle keep-alive loop with a supervisor that tears down and rebuilds the application (including its HTTPX pools) when no round trip completes for 120s - Retry failed startups with exponential backoff so the bot self-heals once the network path recovers - Give up immediately on InvalidToken since a rejected token is a config error that retries cannot fix - Tear down the freshly built app when stop() lands mid-startup so the supervisor never leaks a running application - Bridge python-telegram-bot and httpx stdlib logging into loguru so polling failures are visible in nanobot logs