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

Tdl 812 add wait time for rate limit backoff #90

Merged
merged 6 commits into from Apr 22, 2021

Conversation

savan-chovatiya
Copy link
Contributor

Description of change

  • Added wait time with backoff for retry on 429 error code for minute limit.
  • Added backoff mechanism for discover mode also.

Manual QA steps

  • Raised 429 with a minute limit in a local environment and verified discover and sync mode if the function is retyring.
  • Verified normal scenario of status code 200.

Risks

  • No risk found.

Rollback steps

  • revert this branch

exc_info = sys.exc_info()
resp = exc_info[1].response
sleep_time_str = resp.headers.get('Retry-After')
LOGGER.info("Received 429 -- sleeping for %s seconds", sleep_time_str)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@savan-chovatiya Can you change this message as:
"API rate limit exceeded -- sleeping for %s seconds"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@karanpanchal-crest I have changed the message as per suggestion.

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