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

Wrap a retry and sleep function on the GET request to Ensembl REST API #4

Open
youngchanpark opened this issue May 27, 2021 · 0 comments
Milestone

Comments

@youngchanpark
Copy link
Member

Since we usually run loads of peakplotter run in parallel, a lot of the runs fail due to rate-limit imposed by Ensembl.

Ensembl REST API Rate limits
https://github.com/Ensembl/ensembl-rest/wiki/Rate-Limits

One IP address is allowed 55,000 requests per hour. We can extract the time remaining for the rate limit reset in the HTTP header. So it would be useful to have a sleep function to wait until the rate limit resets and start running again.

We should also have a retry wrapper so the function wouldn't just sleep indefinitely (doubt this would happen but still).

@youngchanpark youngchanpark added this to the v1.0.0 milestone May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant