Version 1.2.2. Added usage overview. Shows token used and cost in $.

This commit is contained in:
2026-04-15 10:00:39 +02:00
parent 752691fe54
commit d4c6420481
18 changed files with 1657 additions and 86 deletions

View File

@@ -85,6 +85,14 @@ class EmailAccountListener:
# ── Main loop ─────────────────────────────────────────────────────────────
async def _run_loop(self) -> None:
"""
Outer retry loop. Restarts the inner trigger/handling loop on any error
with exponential backoff (5s → 10s → 20s → ... → 60s max).
CancelledError is propagated cleanly (listener.stop() cancels the task).
Any other exception is logged and retried — typical causes: IMAP disconnect,
network timeout, credential rotation. Backoff resets on successful cycle.
"""
backoff = 5
while True:
try: