nus-cs2103 / hubatch

Useful batch CLI scripts for GitHub
GNU General Public License v3.0
1 stars 3 forks source link

To avoid Github rate limits #12

Open okkhoy opened 6 years ago

okkhoy commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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".