-
Notifications
You must be signed in to change notification settings - Fork 352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/multi endpint delay #2582
Fix/multi endpint delay #2582
Changes from 3 commits
fb7248e
3377d86
06eeb4c
915e8a4
8c2e54f
02ec4d3
89cd780
237b754
13767b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,9 +104,9 @@ export class ConnectionPoolService<T extends IApiConnectionSpecific<any, any, an | |
try { | ||
// Check if the endpoint is rate-limited | ||
if (await this.poolStateManager.getFieldValue(endpoint, 'rateLimited')) { | ||
logger.info('throtling on ratelimited endpoint'); | ||
const backoffDelay = await this.poolStateManager.getFieldValue(endpoint, 'backoffDelay'); | ||
await delay(backoffDelay / 1000); | ||
const rateLimitDelay = await this.poolStateManager.getFieldValue(endpoint, 'rateLimitDelay'); | ||
logger.info(`throtling on ratelimited endpoint ${rateLimitDelay / 1000}s`); | ||
await delay(rateLimitDelay / 1000); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The backoffDelay parameter is mainly used when setting setRecoverTimeout, and there will be an interval function that displays the current endpoint status (function logEndpointStatus). |
||
} | ||
|
||
const start = Date.now(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still necessary or there will be no throttling