From 01eeb8756effe5b1dbdf0ebef49743de9f169eb3 Mon Sep 17 00:00:00 2001 From: Ken Hibino Date: Wed, 16 Mar 2022 16:41:44 -0700 Subject: [PATCH] (cli): Update queue inspect cmd to show # of groups and aggregating tasks --- tools/asynq/cmd/queue.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/asynq/cmd/queue.go b/tools/asynq/cmd/queue.go index 9bc6eb0..6c8ba8a 100644 --- a/tools/asynq/cmd/queue.go +++ b/tools/asynq/cmd/queue.go @@ -145,12 +145,13 @@ func printQueueInfo(info *asynq.QueueInfo) { bold.Println("Queue Info") fmt.Printf("Name: %s\n", info.Queue) fmt.Printf("Size: %d\n", info.Size) + fmt.Printf("Groups: %d\n", info.Groups) fmt.Printf("Paused: %t\n\n", info.Paused) bold.Println("Task Count by State") printTable( - []string{"active", "pending", "scheduled", "retry", "archived", "completed"}, + []string{"active", "pending", "aggregating", "scheduled", "retry", "archived", "completed"}, func(w io.Writer, tmpl string) { - fmt.Fprintf(w, tmpl, info.Active, info.Pending, info.Scheduled, info.Retry, info.Archived, info.Completed) + fmt.Fprintf(w, tmpl, info.Active, info.Pending, info.Aggregating, info.Scheduled, info.Retry, info.Archived, info.Completed) }, ) fmt.Println()