Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

To avoid Github rate limits #12

Open
okkhoy opened this issue Apr 8, 2018 · 2 comments
Open

To avoid Github rate limits #12

okkhoy opened this issue Apr 8, 2018 · 2 comments

Comments

@okkhoy
Copy link
Contributor

okkhoy commented Apr 8, 2018

We can use the delay between two successive API calls using the relation:
githubDelay = 720 * time.Millisecond // 5000 QPH = 83.3 QPM = 1.38 QPS = 720ms/query to avoid reaching the rate limits.

I am guessing since the delay is sufficiently long, we won't hit the Abuse Rate Limit as well.

@okkhoy
Copy link
Contributor Author

okkhoy commented Apr 8, 2018

Well, I think it may not be very useful. I just noticed that it can go up to about 400 queries before the Abuse detection mechanism is triggered, even with 5 second delay between two successive issue creation calls.

@Skaty
Copy link
Collaborator

Skaty commented Apr 8, 2018

There might also be other factors that are taken into account. In my previous runs, the copy was done to only a single target repository (both of which are in the same organisation, where the bot has write access), while in your case, it is done to multiple repositories. Hence, it might have flagged it as "spammy".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants