fix: [30388f42] Deaktiviere das automatische Überspringen für Associate 528

- Ändert die Circuit-Breaker-Logik in worker.py, damit Events von ID 528 (Bot/User-ID) nicht mehr sofort übersprungen werden.
- Dies ermöglicht manuelle Änderungen durch den Benutzer, der aktuell dieselbe ID wie der Bot verwendet.
- Mögliche Echos werden weiterhin geloggt, aber zur Verarbeitung freigegeben.
This commit is contained in:
2026-03-06 14:22:03 +00:00
parent 2b9c4b737e
commit ebd95be42e

View File

@@ -43,13 +43,12 @@ def process_job(job, so_client: SuperOfficeClient, queue: JobQueue):
payload = job['payload']
event_low = job['event_type'].lower()
# --- CIRCUIT BREAKER: STOP INFINITE LOOPS ---
# Ignore webhooks triggered by our own API user (Associate 528)
# --- CIRCUIT BREAKER: DETECT ECHOES ---
# We log if the event was triggered by our own API user (Associate 528)
# but we NO LONGER SKIP IT, to allow manual changes by the user who shares the same ID.
changed_by = payload.get("ChangedByAssociateId")
if changed_by == 528:
msg = f"Skipping Echo: Event was triggered by our own API user (Associate 528)."
logger.info(f"⏭️ {msg}")
return ("SKIPPED", msg)
logger.info(f" Potential Echo: Event triggered by Associate 528. Proceeding to allow manual user updates.")
# --------------------------------------------
# 0. ID Extraction & Early Exit for irrelevant jobs