Spaces:
Sleeping
Sleeping
Commit History
-
Refactor heartbeat from File I/O to In-Memory IPC
Claude Code +1: Claude Code- Add shared_state.py: Thread-safe in-memory worker state cache - brain_minimal.py: Replace file writes with HTTP POST to /internal/heartbeat - app.py: Add /internal/heartbeat endpoint, read from shared state cache - Decouple worker_status from PID check - now reflects activity level - Eliminate Read-After-Write race conditions This moves from File I/O to In-Memory/IPC for heartbeat monitoring, removing the file-based race conditions diagnosed earlier. Co-Authored-By: Claude Code <noreply@anthropic.com>41564f9