Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Pace requests to avoid rate limits#8

Merged
philipithomas merged 5 commits into
masterStaffjoy/client_python:masterfrom
avoid-ratelimitStaffjoy/client_python:avoid-ratelimitCopy head branch name to clipboard
Apr 2, 2016
Merged

Pace requests to avoid rate limits#8
philipithomas merged 5 commits into
masterStaffjoy/client_python:masterfrom
avoid-ratelimitStaffjoy/client_python:avoid-ratelimitCopy head branch name to clipboard

Conversation

@philipithomas

Copy link
Copy Markdown
Member

By adding sleeps in after requests, we ensure that we are not rate limited.

We use this library internally at Staffjoy. We found that we were getting rate limited internally. As a matter of security, we treat internal services as hostile, so we decided to make this library safer by preventing behavior that could trigger a rate limit.

@philipithomas philipithomas merged commit 34111e4 into master Apr 2, 2016
@philipithomas philipithomas deleted the avoid-ratelimit branch April 2, 2016 23:26
Comment thread staffjoy/resource.py

class Resource:
# Seconds to sleep between requests (bc of rate limits)
REQUEST_SLEEP = 0.5

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i feel like this can be brought down to 0.1 second?

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.