feat(system): add cursor pagination for runtime queue tasks

Replace offset-based page numbers with opaque Redis-backed cursors so
scheduled/retry tasks sort by next run time and live lists stay stable
when queue state changes between requests.
This commit is contained in:
wizardchen
2026-07-14 16:48:01 +08:00
committed by lyingbug
parent f583d77fa0
commit 01f1011511
17 changed files with 620 additions and 114 deletions
+5 -6
View File
@@ -11349,10 +11349,9 @@ const docTemplate = `{
"required": true
},
{
"type": "integer",
"default": 1,
"description": "Page",
"name": "page",
"type": "string",
"description": "Opaque continuation cursor",
"name": "cursor",
"in": "query"
},
{
@@ -20385,8 +20384,8 @@ const docTemplate = `{
"has_more": {
"type": "boolean"
},
"page": {
"type": "integer"
"next_cursor": {
"type": "string"
},
"page_size": {
"type": "integer"
+5 -6
View File
@@ -11342,10 +11342,9 @@
"required": true
},
{
"type": "integer",
"default": 1,
"description": "Page",
"name": "page",
"type": "string",
"description": "Opaque continuation cursor",
"name": "cursor",
"in": "query"
},
{
@@ -20378,8 +20377,8 @@
"has_more": {
"type": "boolean"
},
"page": {
"type": "integer"
"next_cursor": {
"type": "string"
},
"page_size": {
"type": "integer"
+5 -6
View File
@@ -4932,8 +4932,8 @@ definitions:
type: boolean
has_more:
type: boolean
page:
type: integer
next_cursor:
type: string
page_size:
type: integer
tasks:
@@ -12743,11 +12743,10 @@ paths:
name: state
required: true
type: string
- default: 1
description: Page
- description: Opaque continuation cursor
in: query
name: page
type: integer
name: cursor
type: string
- default: 20
description: Page size
in: query