fix(workbench): serialize events and target work order sync

This commit is contained in:
2026-10-08 15:41:49 +08:00
parent b70283c2ff
commit 4a63fcd7ff
20 changed files with 673 additions and 90 deletions
+3 -3
View File
@@ -131,9 +131,9 @@ async def workbench_events(
if now - last_keepalive >= 15:
yield f": keepalive {int(now)}\n\n"
last_keepalive = now
# LISTEN is only a wake-up path. The timeout also reconciles
# against the durable cursor if a notification was missed.
wake_generation = await hub.wait_for_wake(wake_generation, timeout=1)
# The Hub invalidates shared reads on NOTIFY and every 30s.
# Per-client timeout only keeps the transport alive, not SQL.
wake_generation = await hub.wait_for_wake(wake_generation, timeout=15)
yield "event: reconnect\ndata: {}\n\n"
return StreamingResponse(