Go: add command, show tasks summary (#16187)

### What problem does this PR solve?

RAGFlow(admin)> show tasks summary;

+---------+-----------------------------------------------------------------+
| field | value |

+---------+-----------------------------------------------------------------+
| command | show_users_quota_summary |
| error | 'Show users quota summary' is implemented in enterprise
edition |

+---------+-----------------------------------------------------------------+

### 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-06-18 17:09:20 +08:00
committed by GitHub
parent 3762f1e573
commit 5eedd13d49
6 changed files with 82 additions and 0 deletions

View File

@@ -487,6 +487,8 @@ func (p *Parser) parseAdminShowCommand() (*Command, error) {
return p.parseAdminShowDataCommand()
case TokenQuota:
return p.parseAdminShowQuotaCommand()
case TokenTasks:
return p.parseAdminShowQuotaCommand()
default:
return nil, fmt.Errorf("unknown SHOW target: %s", p.curToken.Value)
}
@@ -2367,6 +2369,26 @@ func (p *Parser) parseAdminShowQuotaCommand() (*Command, error) {
return cmd, nil
}
// SHOW TASKS SUMMARY;
func (p *Parser) parseAdminShowTasksCommand() (*Command, error) {
p.nextToken() // consume TASKS
var cmd *Command
switch p.curToken.Type {
case TokenSummary:
p.nextToken()
cmd = NewCommand("admin_show_tasks_summary_command")
default:
return nil, fmt.Errorf("expected SUMMARY after TASKS")
}
// Semicolon is optional
if p.curToken.Type == TokenSemicolon {
p.nextToken()
}
return cmd, nil
}
// PURGE PREVIEW ORPHAN
// PURGE ORPHAN