mirror of
https://github.com/hibiken/asynq.git
synced 2024-11-10 11:31:58 +08:00
Fix bug in RDB.memoryUsage
This commit is contained in:
parent
8b997d2fab
commit
544c301a8b
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user