Skip to content

Fix handling of rate limit by checking response headers in transport #51

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
Jul 17, 2019

Conversation

se7entyse7en
Copy link
Contributor

Closes #11.

This fixes the rate limiter by checking the response headers and sleeping after the last remaining request has been done. See the issue for details.

@carlosms
Copy link
Contributor

Does it make sense to have tests for it? Or will it be completely mocked, and we won't be really testing much...?

@se7entyse7en
Copy link
Contributor Author

Does it make sense to have tests for it? Or will it be completely mocked, and we won't be really testing much...?

I'd open an issue for this to decide also how to test, and this should also be part of the testing design doc. I guess that the main point is whether we want to mock or use a fake org. Even if we decide to mock, this feature would be tested anyway if we're able to assert that the sleep occurs.

Signed-off-by: Lou Marvin Caraig <[email protected]>
Copy link
Contributor

@dpordomingo dpordomingo left a comment

Choose a reason for hiding this comment

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

LGTM

@se7entyse7en
Copy link
Contributor Author

Opened issue #53 for testing.

@se7entyse7en se7entyse7en merged commit bcc9909 into master Jul 17, 2019
@se7entyse7en se7entyse7en deleted the rate-limiter-fix branch July 17, 2019 08:49
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.

Improve HTTPRateLimiter
4 participants