-
Notifications
You must be signed in to change notification settings - Fork 586
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
feat(utl-retry): add util-retry package and its types #4224
Conversation
packages/types/src/retry.ts
Outdated
/** | ||
* | ||
*/ | ||
retrieveRetryTokens(errorInfo: RetryErrorInfo): number; |
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.
how does a number represent retryTokens? is it the count?
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.
Yes, it's the count of the available tokens. The default initial token count is set in constants.ts in util-retry.
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.
is there room to rename this to e.g. getRetryTokenCount
or similar? Some interfaces are called Token and this method name sounds like you are retrieving objects of that type.
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.
Yes, this can be renamed. Updated this to getRetryTokenCount
in the latest.
4416270
to
2b0e056
Compare
Author: Chase Coalwell <782571+srchase@users.noreply.github.com>
2b0e056
to
e2bf5a5
Compare
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Issue
This PR adds the
util-retry
package, which addsStandardRetryStrategy
andAdaptiveRetryStrategy
.These changes were broken out of the draft PR #4187.
middleware-retry
will be updated in another PR to use these new retry strategies.Description
What does this implement/fix? Explain your changes.
Testing
How was this change tested?
Additional context
Add any other context about the PR here.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.