From b8a7bae1e851edfeee5d62a2c66b1c7d3054b5ac Mon Sep 17 00:00:00 2001 From: Gemini Bot Date: Fri, 20 Mar 2026 09:40:34 +0000 Subject: [PATCH] fix: Do not crash container on NetBox connection errors --- sync.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sync.py b/sync.py index 966c1ea..ede9f61 100644 --- a/sync.py +++ b/sync.py @@ -292,7 +292,6 @@ if __name__ == "__main__": log(f"SSL Verify: {VERIFY_SSL}") error_counter = 0 - MAX_ERRORS = 3 while running: log(f"\n--- Sync Start: {time.ctime()} ---") @@ -310,11 +309,8 @@ if __name__ == "__main__": except Exception as e: error_counter += 1 - log(f"CRITICAL ERROR ({error_counter}/{MAX_ERRORS}): Sync abgebrochen! Grund: {e}") - - if error_counter >= MAX_ERRORS: - log("Too many errors. Exiting to allow Docker restart.") - sys.exit(1) + log(f"ERROR ({error_counter}): Sync fehlgeschlagen! Grund: {e}") + log("Warte auf nächstes Intervall...") # Smart Sleep: Check 'running' flag frequently sleep_steps = 10