Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
fix: add COUNT value to scan method, fixes #322
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoomen committed Mar 26, 2021
1 parent 0f209b0 commit ed4dc9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/throttler-storage-redis.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class ThrottlerStorageRedisService implements ThrottlerStorageRedis {
}

async getRecord(key: string): Promise<number[]> {
const ttls = (await this.redis.scan(0, 'MATCH', `${key}:*`)).pop();
const ttls = (await this.redis.scan(0, 'MATCH', `${key}:*`, 'COUNT', 10000)).pop();
return (ttls as string[]).map((k) => parseInt(k.split(':').pop())).sort();
}

Expand Down

0 comments on commit ed4dc9a

Please sign in to comment.