feat: add river-backed async task queue

This commit is contained in:
2026-05-12 10:11:54 +08:00
parent d69aaed444
commit 7e220b7477
30 changed files with 1342 additions and 200 deletions
@@ -0,0 +1,6 @@
ALTER TABLE IF EXISTS gateway_tasks
ADD COLUMN IF NOT EXISTS async_mode boolean NOT NULL DEFAULT false;
CREATE INDEX IF NOT EXISTS idx_gateway_tasks_async_queue
ON gateway_tasks(async_mode, status, next_run_at, priority, created_at)
WHERE async_mode = true;