fix: Do not crash container on NetBox connection errors
Some checks failed
Docker Build & Push / build-and-push (push) Has been cancelled

This commit is contained in:
Gemini Bot
2026-03-20 09:40:34 +00:00
parent c39f973279
commit b8a7bae1e8

View File

@@ -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