Detect a dead local pipeline worker after API restart, and flush SSE.

A docker rebuild left HubAudio status=running with no process, so the UI sat on a silent event stream. Persist the worker pid and disable proxy buffering on the SSE response.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-28 08:50:33 +02:00
co-authored by Cursor
parent ea43b550ee
commit 96e2590a3c
3 changed files with 63 additions and 12 deletions
+9 -1
View File
@@ -471,7 +471,15 @@ async def events(project_id: str, request: Request):
except (asyncio.CancelledError, Exception):
pass
return EventSourceResponse(event_generator())
return EventSourceResponse(
event_generator(),
ping=15,
headers={
"Cache-Control": "no-cache, no-transform",
"X-Accel-Buffering": "no",
"Connection": "keep-alive",
},
)
@router.get("/pipeline/{project_id}/status")