Skip to content
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

Add support for retrying rate-limited API requests #3538

Merged
merged 6 commits into from
Mar 31, 2021
Merged

Conversation

mshafrir-stripe
Copy link
Collaborator

@mshafrir-stripe mshafrir-stripe commented Mar 30, 2021

Summary

The retry logic uses exponential backoff. See RetryDelaySupplier
for more details.

See https://stripe.com/docs/rate-limits#object-lock-timeouts
for more details.

Motivation

Support rate-limiting.

Testing

  • Added tests
  • Modified tests
  • Manually verified

Configure with `Stripe.MAX_RETRIES`. `Stripe.MAX_RETRIES` defaults to 3.

The retry logic uses exponential backoff. See `RetryDelaySupplier`
for more details.

See https://stripe.com/docs/rate-limits#object-lock-timeouts
for more details.
@mshafrir-stripe mshafrir-stripe merged commit fa11fb9 into master Mar 31, 2021
@mshafrir-stripe mshafrir-stripe deleted the rate-limit branch March 31, 2021 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants