mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-21 23:21:04 +08:00
Go: add command, list, remove, stop tasks (#16190)
### What problem does this PR solve? ``` RAGFlow(admin)> stop user 'abc' ingestion tasks; +-----------------------------------+-------+--------------------------------------------------------------------------+-------+ | command | email | error | tasks | +-----------------------------------+-------+--------------------------------------------------------------------------+-------+ | stop_ingestion_tasks_by_condition | abc | 'Stop ingestion tasks by condition' is implemented in enterprise edition | | +-----------------------------------+-------+--------------------------------------------------------------------------+-------+ RAGFlow(admin)> stop user 'abc' ingestion tasks 'created; +-----------------------------------+-------+--------------------------------------------------------------------------+----------+-------+ | command | email | error | status | tasks | +-----------------------------------+-------+--------------------------------------------------------------------------+----------+-------+ | stop_ingestion_tasks_by_condition | abc | 'Stop ingestion tasks by condition' is implemented in enterprise edition | created; | | +-----------------------------------+-------+--------------------------------------------------------------------------+----------+-------+ RAGFlow(admin)> stop user 'abc' ingestion tasks 'create'; +-----------------------------------+-------+--------------------------------------------------------------------------+--------+-------+ | command | email | error | status | tasks | +-----------------------------------+-------+--------------------------------------------------------------------------+--------+-------+ | stop_ingestion_tasks_by_condition | abc | 'Stop ingestion tasks by condition' is implemented in enterprise edition | create | | +-----------------------------------+-------+--------------------------------------------------------------------------+--------+-------+ RAGFlow(admin)> remove user 'abc' ingestion tasks 'create'; +-------------------------------------+-------+----------------------------------------------------------------------------+--------+-------+ | command | email | error | status | tasks | +-------------------------------------+-------+----------------------------------------------------------------------------+--------+-------+ | remove_ingestion_tasks_by_condition | abc | 'Remove ingestion tasks by condition' is implemented in enterprise edition | create | | +-------------------------------------+-------+----------------------------------------------------------------------------+--------+-------+ RAGFlow(admin)> remove user 'abc' ingestion tasks; +-------------------------------------+-------+----------------------------------------------------------------------------+-------+ | command | email | error | tasks | +-------------------------------------+-------+----------------------------------------------------------------------------+-------+ | remove_ingestion_tasks_by_condition | abc | 'Remove ingestion tasks by condition' 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:
@@ -161,6 +161,12 @@ func (c *CLI) ExecuteAdminCommand(cmd *Command) (ResponseIf, error) {
|
||||
return c.AdminPurgeUserCommand(cmd)
|
||||
case "admin_purge_users_command":
|
||||
return c.AdminPurgeUsersCommand(cmd)
|
||||
case "admin_list_user_ingestion_tasks_command":
|
||||
return c.AdminListUserIngestionTasksCommand(cmd)
|
||||
case "admin_stop_user_ingestion_tasks_command":
|
||||
return c.AdminStopUserIngestionTasksCommand(cmd)
|
||||
case "admin_remove_user_ingestion_tasks_command":
|
||||
return c.AdminRemoveUserIngestionTasksCommand(cmd)
|
||||
// TODO: Implement other commands
|
||||
case "show_admin_server":
|
||||
return c.ShowAdminServer(cmd)
|
||||
|
||||
Reference in New Issue
Block a user