2
0
mirror of https://github.com/hibiken/asynq.git synced 2024-09-20 11:05:58 +08:00

(cli): Update queue inspect cmd to show # of groups and aggregating tasks

This commit is contained in:
Ken Hibino 2022-03-16 16:41:44 -07:00
parent 47af17cfb4
commit 01eeb8756e

View File

@ -145,12 +145,13 @@ func printQueueInfo(info *asynq.QueueInfo) {
bold.Println("Queue Info") bold.Println("Queue Info")
fmt.Printf("Name: %s\n", info.Queue) fmt.Printf("Name: %s\n", info.Queue)
fmt.Printf("Size: %d\n", info.Size) fmt.Printf("Size: %d\n", info.Size)
fmt.Printf("Groups: %d\n", info.Groups)
fmt.Printf("Paused: %t\n\n", info.Paused) fmt.Printf("Paused: %t\n\n", info.Paused)
bold.Println("Task Count by State") bold.Println("Task Count by State")
printTable( printTable(
[]string{"active", "pending", "scheduled", "retry", "archived", "completed"}, []string{"active", "pending", "aggregating", "scheduled", "retry", "archived", "completed"},
func(w io.Writer, tmpl string) { 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() fmt.Println()