We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f410c2b commit 591587cCopy full SHA for 591587c
services/libs/redis/src/rateLimiter.ts
@@ -49,7 +49,8 @@ export class ConcurrentRequestLimiter implements IConcurrentRequestLimiter {
49
50
if (!canMakeRequest) {
51
if (retries > 0) {
52
- await timeout(sleepTimeMs)
+ const randomizedSleepTime = sleepTimeMs + Math.floor(Math.random() * sleepTimeMs)
53
+ await timeout(randomizedSleepTime)
54
return this.checkConcurrentRequestLimit(integrationId, retries - 1, sleepTimeMs)
55
} else {
56
throw new Error(`Too many concurrent requests for integration ${integrationId}`)
0 commit comments