groovecoder / discord

GitHub webhook that analyzes pull requests and adds comments about incompatible CSS
Mozilla Public License 2.0
29 stars 13 forks source link

React to rate-limit being reached #87

Open openjck opened 9 years ago

openjck commented 9 years ago

When using OAUTH authentication, we are limited to 5,000 API calls per hour. We need to handle the case where the limit is reached.

groovecoder commented 9 years ago

Yes, big :+1: for this!

darkwing commented 9 years ago

Great idea @openjck . We may want to investigate a way to request/purchase increased rate limits as something like this would definitely, definitely limit scale. We may need multiple accounts to work around it, or something.

Anywho, this is a great starting idea!

groovecoder commented 9 years ago

Are we making the API reuqests with an oauth2 key/secret? We already have an MDN GitHub application; we could use its client/secret to increase our rate limit from 60/hour to 5,000/hour.

Faeranne commented 9 years ago

We are using an API token with the commenter, which should already give us the 5,000/hour on comments. Octonode, however, is not using the token.

openjck commented 9 years ago

We should still do this, but as it turns out, the rate-limit isn't the problem here. Comments fail to appear even when we are well below the limit. I'll open a separate issue for the real culprit.

openjck commented 9 years ago

Opened #104 for the issue that actually prevented comments from appearing.

openjck commented 9 years ago

limiter looks to be the best-supported node module for dealing with rate limits.

groovecoder commented 8 years ago

I think this is fixed via #112?

openjck commented 8 years ago

Similar!

What we called a rate-limit in #104 was actually just an anti-spam system. Submitting too many comments too quickly triggered the system and caused some comments to be dropped. We fixed that with #131.

There's also a true API rate-limit of something like 5,000 requests per hour. This issue is about reacting when we reach that limit.