harden article generation reliability
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
CREATE INDEX IF NOT EXISTS idx_generation_tasks_active_state_check
|
||||
ON generation_tasks(updated_at DESC, id DESC)
|
||||
WHERE article_id IS NOT NULL
|
||||
AND status IN ('queued', 'running');
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_generation_tasks_recent_completed_state_check
|
||||
ON generation_tasks(updated_at DESC, id DESC)
|
||||
WHERE article_id IS NOT NULL
|
||||
AND status = 'completed';
|
||||
Reference in New Issue
Block a user