feat(system): expand runtime queue task inspection and safe actions

Replace failed-only task views with state-aware runtime task listing,
operator-safe cancel/run-now/delete actions, orphan detection, and
multimodal queue cleanup for deleted knowledge rows.
This commit is contained in:
wizardchen
2026-07-14 15:17:45 +08:00
committed by lyingbug
parent 1eae475a1f
commit 4ae48d6acf
22 changed files with 2337 additions and 481 deletions
+5 -7
View File
@@ -899,14 +899,12 @@ func RegisterSystemAdminRoutes(
adminRoutes.PUT("/settings/:key", handler.UpdateSystemSetting)
adminRoutes.DELETE("/settings/:key", handler.ResetSystemSetting)
// Runtime observability: live asynq queue depths + worker pool
// concurrency for the parse/wiki pools. Read-only snapshot for the
// SystemAdmin runtime dashboard. Returns available=false in Lite
// mode (no Redis) so the UI degrades gracefully.
// Runtime operations: live asynq queue depths, safe task projections,
// and state-checked task actions for the SystemAdmin dashboard. Lite
// mode returns available=false.
adminRoutes.GET("/runtime/queues", handler.GetRuntimeQueues)
adminRoutes.GET("/runtime/queues/:queue/failed-tasks", handler.ListRuntimeFailedTasks)
adminRoutes.POST("/runtime/queues/:queue/failed-tasks/:task_id/retry", handler.RetryRuntimeFailedTask)
adminRoutes.DELETE("/runtime/queues/:queue/failed-tasks/:task_id", handler.DeleteRuntimeFailedTask)
adminRoutes.GET("/runtime/queues/:queue/tasks", handler.ListRuntimeTasks)
adminRoutes.POST("/runtime/queues/:queue/tasks/:task_id/actions/:action", handler.MutateRuntimeTask)
// Bulk action — write the current default-quota setting onto
// every existing tenant. Lives under /tenants instead of