[30e88f42] ✦ In dieser Sitzung haben wir den End-to-End-Test der SuperOffice-Schnittstelle erfolgreich von der automatisierten Simulation bis zum produktiven Live-Lauf
✦ In dieser Sitzung haben wir den End-to-End-Test der SuperOffice-Schnittstelle erfolgreich von der automatisierten Simulation bis zum produktiven Live-Lauf mit Echtdaten abgeschlossen.
This commit is contained in:
25
trigger_resync.py
Normal file
25
trigger_resync.py
Normal file
@@ -0,0 +1,25 @@
|
||||
import sqlite3
|
||||
import json
|
||||
import time
|
||||
|
||||
DB_PATH = "connector_queue.db"
|
||||
|
||||
def trigger_resync(contact_id):
|
||||
print(f"🚀 Triggering manual resync for Contact {contact_id}...")
|
||||
|
||||
payload = {
|
||||
"Event": "contact.changed",
|
||||
"PrimaryKey": contact_id,
|
||||
"ContactId": contact_id,
|
||||
"Changes": ["UserDefinedFields", "Name"] # Dummy changes to pass filters
|
||||
}
|
||||
|
||||
with sqlite3.connect(DB_PATH) as conn:
|
||||
conn.execute(
|
||||
"INSERT INTO jobs (event_type, payload, status) VALUES (?, ?, ?)",
|
||||
("contact.changed", json.dumps(payload), 'PENDING')
|
||||
)
|
||||
print("✅ Job added to queue.")
|
||||
|
||||
if __name__ == "__main__":
|
||||
trigger_resync(6) # Bennis Playland has CRM ID 6
|
||||
Reference in New Issue
Block a user