Problem: - Workers generate random UUID on startup (runtime ID) - Database stores workers with persistent IDs (database ID) - UI sends commands using database ID - Server couldn't find worker connection (stored by runtime ID) - Result: 400 Bad Request "Worker not connected" Solution: - When worker connects, look up database ID by worker name - Store WebSocket connection in Map using BOTH IDs: * Runtime ID (from worker_connect message) * Database ID (from database lookup by name) - Commands from UI use database ID → finds correct WebSocket - Cleanup both IDs when worker disconnects Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
26 KiB
26 KiB