2
0
mirror of https://github.com/hibiken/asynq.git synced 2024-09-20 02:55:54 +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 eb064c2bab
commit 47af17cfb4
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,