From f0a6b79a82310c923358e3515e96dc0caf06640d Mon Sep 17 00:00:00 2001 From: TheRaiwy Date: Fri, 10 Jul 2026 20:47:57 +0300 Subject: [PATCH] Retry on all errors (timeouts, crashes) instead of giving up --- main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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: