Files
multica/server/migrations/069_drop_task_last_heartbeat.up.sql
LinYushen 250ada1fb3 chore(db): drop unused agent_task_queue.last_heartbeat_at (#2212)
Drops the unused agent_task_queue.last_heartbeat_at column and removes the hot-path task heartbeat write.
2026-05-07 15:45:29 +08:00

11 lines
595 B
SQL

-- Drops agent_task_queue.last_heartbeat_at. The column was introduced in
-- migration 055 as scaffolding for "future enhancements" (telling stale
-- tasks apart from long-running ones), but no consumer was ever built:
-- runtime liveness is owned by agent_runtime.last_seen_at + the Redis
-- LivenessStore, and FailStaleTasks keys off dispatched_at/started_at.
-- The only writer was UpdateAgentTaskSession bumping it on every PinTaskSession
-- call, which was a wasted write. Drop the column so the write goes away too.
ALTER TABLE agent_task_queue
DROP COLUMN IF EXISTS last_heartbeat_at;