fix: fence worker retries and object publication

This commit is contained in:
237899745
2026-07-26 02:03:57 +08:00
parent 016ce9ebab
commit 57892f6509
4 changed files with 1146 additions and 237 deletions

View File

@@ -0,0 +1,17 @@
ALTER TABLE tasks
ADD COLUMN IF NOT EXISTS processing_attempt BIGINT NOT NULL DEFAULT 0,
ADD COLUMN IF NOT EXISTS lease_owner UUID,
ADD COLUMN IF NOT EXISTS lease_until TIMESTAMPTZ;
ALTER TABLE task_files
ADD COLUMN IF NOT EXISTS processing_attempt BIGINT NOT NULL DEFAULT 0,
ADD COLUMN IF NOT EXISTS lease_owner UUID,
ADD COLUMN IF NOT EXISTS lease_until TIMESTAMPTZ;
CREATE INDEX IF NOT EXISTS idx_tasks_processing_lease
ON tasks(lease_until)
WHERE status = 'processing';
CREATE INDEX IF NOT EXISTS idx_task_files_processing_lease
ON task_files(task_id, lease_until)
WHERE status = 'processing';