2
0
mirror of https://github.com/hibiken/asynq.git synced 2025-10-21 21:46:12 +08:00

Fix RDB.CurrentStats to report the correct queue size

This commit is contained in:
Ken Hibino
2022-03-16 16:31:19 -07:00
parent bfd0980d7a
commit 1a513a529b
2 changed files with 2 additions and 1 deletions

View File

@@ -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

View File

@@ -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,