INNER CODE UNIT · Python
websocket_endpoint
airweave-ai/error-monitoring-agent · backend/main.py:555
async def websocket_endpoint(websocket: WebSocket):
"""
WebSocket endpoint for real-time pipeline updates.
Messages sent:
- pipeline_started: Pipeline execution has begun
- step_started: A step has started processing
- step_completed: A step has finished
- pipeline_completed: All steps finished successfully
- pipeline_error: An error occurred
"""
await manager.connect(websocket)
try:
while True:
# Keep connection alive and handle incoming messages
data = await websocket.receive_text()
message = json.loads(data)