feat: add retry(10) on all network requests
- New src/retry.py with configurable retry decorator - Applied @retry() to fetch_unseen_emails, mark_as_seen, summarize_email, and send_message - No backoff delay between retries
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import requests
|
||||
from src.config import TelegramConfig
|
||||
from src.retry import retry
|
||||
|
||||
|
||||
@retry()
|
||||
def send_message(tg_cfg: TelegramConfig, text: str):
|
||||
url = f"https://api.telegram.org/bot{tg_cfg.bot_token}/sendMessage"
|
||||
payload = {
|
||||
|
||||
Reference in New Issue
Block a user