We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e34db4d commit 7be0a34Copy full SHA for 7be0a34
1 file changed
lib/api/apiUtils/rateLimit/tokenBucket.js
@@ -16,7 +16,7 @@ const { instance: redisClient } = require('./client');
16
const { config } = require('../../../Config');
17
const { calculateInterval } = require('./gcra');
18
19
-// Map of bucket name -> WorkerTokenBucket instance
+// Map of `${resourceClass}:${resourceId}:${measure}` -> WorkerTokenBucket instance
20
const tokenBuckets = new Map();
21
22
/**
@@ -36,6 +36,7 @@ class WorkerTokenBucket {
36
this.interval = calculateInterval(this.limitConfig.limit, config.rateLimiting.nodes);
37
this.lastRefillTime = Date.now();
38
this.refillCount = 0;
39
+ this.refillInProgress = false;
40
}
41
42
hasCapacity() {
0 commit comments