mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-27 13:06:20 +02:00
* feat: add daemon skill bundle refs Co-authored-by: multica-agent <github@multica.ai> * fix: tighten skill bundle resolve safeguards Co-authored-by: multica-agent <github@multica.ai> * feat: add task prepare lease Co-authored-by: multica-agent <github@multica.ai> * fix: isolate prepare lease concurrent index migration Co-authored-by: multica-agent <github@multica.ai> * fix: keep prepare lease active through start Co-authored-by: multica-agent <github@multica.ai> --------- Co-authored-by: J <j@multica.ai> Co-authored-by: multica-agent <github@multica.ai>
9 lines
519 B
SQL
9 lines
519 B
SQL
-- Covers reclaim scans over dispatched tasks while allowing prepare lease checks.
|
|
--
|
|
-- agent_task_queue is hot, so this must stay in its own single-statement
|
|
-- migration and must use CONCURRENTLY. Keeping CONCURRENTLY isolated avoids
|
|
-- Postgres' implicit transaction block for multi-statement query strings.
|
|
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_agent_task_queue_dispatched_prepare
|
|
ON agent_task_queue (runtime_id, priority DESC, dispatched_at ASC)
|
|
WHERE status = 'dispatched' AND started_at IS NULL;
|