summaryrefslogtreecommitdiff
path: root/backend/app/services/tasks.py
AgeCommit message (Collapse)Author
2026-02-14Add background task persistence for debate & council operationsYurenHao0426
Decouple debate/council execution from SSE connection lifecycle so tasks survive browser disconnects. Backend runs work as asyncio.Tasks with progressive disk persistence; frontend can reconnect and recover state. - New backend/app/services/tasks.py: task registry, broadcast pattern, disk persistence at milestones, stale task cleanup on startup - New endpoints: POST start_debate/start_council, GET task stream/poll - Frontend stores taskId on nodes, recovers running tasks on page load - _applyPartialEvents rebuilds stage text + data from accumulated events Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>