diff --git a/main.py b/main.py index 3adb629..268b35b 100644 --- a/main.py +++ b/main.py @@ -775,7 +775,11 @@ def _process_one(tid: int, acc: dict, continue break except Exception as e: - log.error("[T%d] Error: %s", tid, e) + log.error("[T%d] Error: %s (attempt %d/%d)", tid, e, attempt + 1, max_retries) + if attempt + 1 < max_retries: + log.info("[T%d] Retrying after error...", tid) + time.sleep(5) + continue break finally: if TEST_MODE: