From 47af17cfb4f1e02a2ee6c6113b5e2f891a733c16 Mon Sep 17 00:00:00 2001 From: Ken Hibino Date: Wed, 16 Mar 2022 16:31:19 -0700 Subject: [PATCH] Fix RDB.CurrentStats to report the correct queue size --- internal/rdb/inspect.go | 1 + internal/rdb/inspect_test.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/rdb/inspect.go b/internal/rdb/inspect.go index 9deb57d..44ae569 100644 --- a/internal/rdb/inspect.go +++ b/internal/rdb/inspect.go @@ -224,6 +224,7 @@ func (r *RDB) CurrentStats(qname string) (*Stats, error) { stats.Groups = val case "aggregating_count": stats.Aggregating = val + size += val } } stats.Size = size diff --git a/internal/rdb/inspect_test.go b/internal/rdb/inspect_test.go index 864a6a4..9fd08b4 100644 --- a/internal/rdb/inspect_test.go +++ b/internal/rdb/inspect_test.go @@ -168,7 +168,7 @@ func TestCurrentStats(t *testing.T) { want: &Stats{ Queue: "default", Paused: false, - Size: 4, + Size: 5, Groups: 1, Pending: 1, Active: 1,