diff --git a/conversion_helpers.go b/conversion_helpers.go index 764e57a..9fa78bd 100644 --- a/conversion_helpers.go +++ b/conversion_helpers.go @@ -82,18 +82,21 @@ type queueStateSnapshot struct { MemoryUsage int64 `json:"memory_usage_bytes"` // Total number of tasks in the queue. Size int `json:"size"` + // Totoal number of groups in the queue. + Groups int `json:"groups"` // Latency of the queue in milliseconds. LatencyMillisec int64 `json:"latency_msec"` // Latency duration string for display purpose. DisplayLatency string `json:"display_latency"` // Number of tasks in each state. - Active int `json:"active"` - Pending int `json:"pending"` - Scheduled int `json:"scheduled"` - Retry int `json:"retry"` - Archived int `json:"archived"` - Completed int `json:"completed"` + Active int `json:"active"` + Pending int `json:"pending"` + Aggregating int `json:"aggregating"` + Scheduled int `json:"scheduled"` + Retry int `json:"retry"` + Archived int `json:"archived"` + Completed int `json:"completed"` // Total number of tasks processed during the given date. // The number includes both succeeded and failed tasks. @@ -117,6 +120,7 @@ func toQueueStateSnapshot(info *asynq.QueueInfo) *queueStateSnapshot { DisplayLatency: info.Latency.Round(10 * time.Millisecond).String(), Active: info.Active, Pending: info.Pending, + Aggregating: info.Aggregating, Scheduled: info.Scheduled, Retry: info.Retry, Archived: info.Archived, diff --git a/go.mod b/go.mod index 9d0f1c8..f783bdd 100644 --- a/go.mod +++ b/go.mod @@ -15,3 +15,5 @@ require ( golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect google.golang.org/protobuf v1.27.1 // indirect ) + +replace github.com/hibiken/asynq => ../../../database/Redis/go/asynq diff --git a/ui/src/api.ts b/ui/src/api.ts index 50f789a..03681fa 100644 --- a/ui/src/api.ts +++ b/ui/src/api.ts @@ -254,11 +254,13 @@ export interface Queue { queue: string; paused: boolean; size: number; + groups: number; latency_msec: number; display_latency: string; memory_usage_bytes: number; active: number; pending: number; + aggregating: number; scheduled: number; retry: number; archived: number; diff --git a/ui/src/components/QueueInfoBanner.tsx b/ui/src/components/QueueInfoBanner.tsx index 8c8f26c..826250b 100644 --- a/ui/src/components/QueueInfoBanner.tsx +++ b/ui/src/components/QueueInfoBanner.tsx @@ -65,6 +65,15 @@ function QueueInfoBanner(props: Props & ReduxProps) { +