Skip to content

Commit

Permalink
Fix bug in RDB.memoryUsage
Browse files Browse the repository at this point in the history
  • Loading branch information
hibiken committed Apr 4, 2021
1 parent 8b997d2 commit 544c301
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions internal/rdb/inspect.go
Expand Up @@ -172,10 +172,14 @@ func (r *RDB) CurrentStats(qname string) (*Stats, error) {
}

func (r *RDB) memoryUsage(qname string) (int64, error) {
var cursor uint64
var keys []string
var (
keys []string
data []string
cursor uint64
err error
)
for {
data, cursor, err := r.client.Scan(cursor, fmt.Sprintf("asynq:{%s}*", qname), 100).Result()
data, cursor, err = r.client.Scan(cursor, fmt.Sprintf("asynq:{%s}*", qname), 100).Result()
if err != nil {
return 0, err
}
Expand Down

0 comments on commit 544c301

Please sign in to comment.