Go: Admin list ingestion tasks (#14695)

### What problem does this PR solve?

```
RAGFlow(admin)> list tasks;
+-------------+------------------+----------------------------------+-------------+-----------+----------------------------------+----------+----------------------+-------------+-----------+---------+
| chunk_count | digest           | document_id                      | duration    | from_page | id                               | priority | progress             | retry_count | task_type | to_page |
+-------------+------------------+----------------------------------+-------------+-----------+----------------------------------+----------+----------------------+-------------+-----------+---------+
| 16          | 8a0016a0dc3cbdbb | f6aa38bb4ad111f1ba6338a74640adcc | 1511.156966 | 0         | f91e4f104ad111f1aaaf38a74640adcc | 0        | 1                    | 1           |           | 12      |
+-------------+------------------+----------------------------------+-------------+-----------+----------------------------------+----------+----------------------+-------------+-----------+---------+
```

### Type of change

- [x] New Feature (non-breaking change which adds functionality)

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-05-09 10:03:23 +08:00
committed by GitHub
parent 5e96c5cae6
commit b6abce50b1
9 changed files with 90 additions and 0 deletions

View File

@@ -190,6 +190,8 @@ func (p *Parser) parseAdminListCommand() (*Command, error) {
return NewCommand("list_user_chats"), nil
case TokenFiles:
return p.parseAdminListFiles()
case TokenTasks:
return p.parseAdminListTasks()
default:
return nil, fmt.Errorf("unknown LIST target: %s", p.curToken.Value)
}
@@ -368,6 +370,12 @@ func (p *Parser) parseAdminListFiles() (*Command, error) {
return cmd, nil
}
func (p *Parser) parseAdminListTasks() (*Command, error) {
p.nextToken() // consume TASKS
cmd := NewCommand("list_admin_tasks")
return cmd, nil
}
func (p *Parser) parseAdminShowCommand() (*Command, error) {
p.nextToken() // consume SHOW