mirror of
https://github.com/hibiken/asynq.git
synced 2024-12-27 00:02:19 +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) {
|
func (r *RDB) memoryUsage(qname string) (int64, error) {
|
||||||
var cursor uint64
|
var (
|
||||||
var keys []string
|
keys []string
|
||||||
|
data []string
|
||||||
|
cursor uint64
|
||||||
|
err error
|
||||||
|
)
|
||||||
for {
|
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 {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user