Version 1.2.2. Added usage overview. Shows token used and cost in $.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user