feat(system): add runtime task queue observability dashboard for system admins

Expose live asynq queue depths and worker-pool concurrency via a new SystemAdmin API and settings UI, so operators can monitor parsing/wiki backlog without Redis CLI access.
This commit is contained in:
wizardchen
2026-07-10 22:36:58 +08:00
committed by lyingbug
parent 30f7630ac4
commit fe47ac1f96
16 changed files with 1339 additions and 22 deletions
+6
View File
@@ -875,6 +875,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.
adminRoutes.GET("/runtime/queues", handler.GetRuntimeQueues)
// Bulk action — write the current default-quota setting onto
// every existing tenant. Lives under /tenants instead of
// /settings because it changes tenants, not the setting row.