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

Sleep for 2 seconds between requests. #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hassanmian
Copy link

No description provided.

@hassanmian
Copy link
Author

Looping through several organisations was triggering throttling by remote. Added sleep to "simulate" normal user interaction.

@rotsee
Copy link
Member

rotsee commented Apr 17, 2023

This looks useful, but I wonder if this shouldn't be optional, or configurable, as 2 seconds is a long wait for those who don't trigger the remote throttling? That could simply be a property of the Company class, so that

c = Company("XXXXXX-XXXX")
c.sleep_between = 2
c.data

or possibly

opts = {
  "sleep_between": 2
}
c = Company("XXXXXX-XXXX", opts)
c.data

@hassanmian
Copy link
Author

Totally agree.

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