Changes: - Removed duplicate /api/executions/:id endpoint that didn't parse logs - Added workers Map to track worker_id -> WebSocket connection - Store worker connections when they send worker_connect message - Send commands to specific worker instead of broadcasting to all clients - Clean up workers Map when worker disconnects - Update execution status to completed/failed when command results arrive - Add proper error handling when worker is not connected Fixes: - execution.logs.forEach is not a function (logs now properly parsed) - Commands stuck in "running" status (now update to completed/failed) - Commands not reaching workers (now sent to specific worker WebSocket) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
25 KiB
25 KiB