diff --git a/connector-superoffice/worker.py b/connector-superoffice/worker.py index a184a6b3..3b789485 100644 --- a/connector-superoffice/worker.py +++ b/connector-superoffice/worker.py @@ -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