mirror of
https://github.com/hibiken/asynq.git
synced 2024-11-10 11:31:58 +08:00
Fix RDB.CurrentStats to report the correct queue size
This commit is contained in:
parent
eb064c2bab
commit
47af17cfb4
@ -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
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user