这是indexloc提供的服务,不要输入任何密码
Skip to content

Add backoff if rate limits are hit #122

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

Merged
merged 2 commits into from
Jun 22, 2023
Merged

Add backoff if rate limits are hit #122

merged 2 commits into from
Jun 22, 2023

Conversation

dglsparsons
Copy link
Collaborator

@dglsparsons dglsparsons commented Jun 21, 2023

Very simplistic, but hoping this will alleviate some of the rate-limiting issues we sometimes see.

Effectively it:

  • Will try each API call up to 3 additional times if getting rate limited
  • Waits for rate limit to expire if a rate-limit is encountered
  • Bails on waiting if the rate limit is too long (> 5 minutes)

Closes #99

Very simple so far, but hoping this will alleviate some of the
rate limiting issues
@dglsparsons dglsparsons marked this pull request as ready for review June 22, 2023 10:03
@dglsparsons dglsparsons enabled auto-merge (squash) June 22, 2023 16:13
@dglsparsons dglsparsons merged commit 9f337e8 into main Jun 22, 2023
@dglsparsons dglsparsons deleted the rate-limit-backoff branch June 22, 2023 16:23
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.

Should retry on rate limit
2 participants