#362 CRITICAL: Heartbeat updates not committed to database

closed critical Created 2025-12-11 21:39 · Updated 2025-12-12 14:48

Description

Edit
## Issue The heartbeat service in engine/services/heartbeat_service.py:179-207 updates heartbeats without committing the transaction. ```python with db.get_db_connection() as conn, conn.cursor() as cur: for queue_name, run_ids in runs_by_queue.items(): cur.execute(...) # BUG: No conn.commit()! ``` The get_db_connection() context manager does NOT auto-commit. The UPDATE statements are never committed. ## Impact - Heartbeats are never actually persisted - TimeoutService sees stale last_heartbeat values - Running tasks will be incorrectly marked as timed out ## Location engine/services/heartbeat_service.py:179-207 ## Fix Add conn.commit() after the UPDATE loop

Comments

Loading comments...

Context

Loading context...

Audit History

View All
Loading audit history...