fix: [30388f42] Unterbreche Webhook-Endlosschleife
- Aktualisiert den Zeitstempel in SuperOffice nur noch dann, wenn auch andere inhaltliche Änderungen vorliegen. - Dies verhindert, dass der Worker durch seine eigene Zeitstempel-Aktualisierung ständig neue Webhooks triggert (besonders relevant, da User und Bot die gleiche ID 528 teilen). - Beruhigt das System und führt zu stabilen 'SUCCESS' Zuständen im Dashboard.
This commit is contained in:
@@ -306,7 +306,9 @@ def process_job(job, so_client: SuperOfficeClient, queue: JobQueue):
|
||||
contact_patch["UserDefinedFields"][settings.UDF_SUMMARY] = short_summary
|
||||
|
||||
# --- D. Timestamps & Website Sync ---
|
||||
if settings.UDF_LAST_UPDATE:
|
||||
# CRITICAL: We only update the timestamp if we actually have OTHER changes to push.
|
||||
# Otherwise, we create an infinite loop of self-triggering webhooks.
|
||||
if settings.UDF_LAST_UPDATE and contact_patch:
|
||||
now_so = f"[D:{datetime.now().strftime('%m/%d/%Y %H:%M:%S')}]"
|
||||
if "UserDefinedFields" not in contact_patch: contact_patch["UserDefinedFields"] = {}
|
||||
contact_patch["UserDefinedFields"][settings.UDF_LAST_UPDATE] = now_so
|
||||
|
||||
Reference in New Issue
Block a user