Skip to content

Alter rate limiting approach to be better in multi-threaded contexts #3

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 4 commits into from
Jan 20, 2022
Merged

Alter rate limiting approach to be better in multi-threaded contexts #3

merged 4 commits into from
Jan 20, 2022

Conversation

Majored
Copy link
Contributor

@Majored Majored commented Jan 19, 2022

Hi ya,

This PR changes the approach to rate limiting to work more effectively in multi-threaded contexts. It also ensures that a request is never sent if we've previously been rate-limited and are still within the rate-limiting period/delay returned in the Retry-After header.

As discussed here: #1

I've tested these changes using a local API instance and everything's working as expected.
Let me know if you'd like to see any changes. 👍

@swanis swanis merged commit 7fcd64e into swanis:main Jan 20, 2022
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.

2 participants