Fix async retry - #2630
Fix async retry #2630
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Multipart uploads cannot reuse the same one-shot FormData across retry attempts.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds opt-in retry handling for transient async Telegram API failures.
Changes:
- Adds retry configuration matching the synchronous helper.
- Retries aiohttp errors and timeouts before raising
RequestTimeout.
File summaries
| File | Description |
|---|---|
telebot/asyncio_helper.py |
Implements configurable async request retries. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| REQUEST_TIMEOUT = 300 | ||
| MAX_RETRIES = 3 | ||
| RETRY_ON_ERROR = False | ||
| RETRY_TIMEOUT = 2 |
|
looks good i guess |
| MAX_RETRIES = 3 | ||
| RETRY_ON_ERROR = False | ||
| RETRY_TIMEOUT = 2 | ||
| MAX_RETRIES = 15 |
There was a problem hiding this comment.
I wonder why we need 15 max retries though
There was a problem hiding this comment.
I made this equal to SYNC version. Both for naming and values.
Naming better to keep, but values may be set as you wish. May change both to 3.
|
3 should be fine yeah for max_retries |
|
Done? |
|
yes |
|
Thnx. I'll test the current version on prod for weekend. If it's ok - release. |
Description
Fix async retry (#2599)