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

add queue management for comments. fixes #104 #124

Closed Faeranne closed 9 years ago

Faeranne commented 9 years ago

Adds a 3 second delay between comments, and a 15 second delay when we hit the rate limit, then retries.

The queue module needs to be split to a separate process, but I'm still not 100% familiar with nodejs threading. I'll open a second PR if/when I've got that figured out.

openjck commented 9 years ago

Awesome! Thanks for helping us to puzzle this out. We have been thinking about lightweight solutions like using setTimeout and limiter and have also considered some longer-term solutions like RabbitMQ.

When @darkwing and I spoke last we were leaning more toward the RabbitMQ end. I'm planning to start looking into that this week. Would it make sense to touch base again after that?

Faeranne commented 9 years ago

Since we are approching the demo deadline, we probably need something in place. I'm fine with RabbitMQ, but till that is discussed and implemented, we should have something. This bug is preventing our application from working.

openjck commented 9 years ago

Definitely. It would be great to have something going before the demo time. We could merge this or the the pull request that uses limiter for now and make improvements later. It might also be nice to use a more long-term solution from the start so that we can avoid re-working the code, especially if we can get it in before the end of the week. Did you want to say more @darkwing?

groovecoder commented 9 years ago

Something before the end of the week would be great so we could post/demo/ship v1 to N users.

But if the long-term implementation only adds a few days that's fine too. We're holding ourselves to our own deadlines and targets here.

openjck commented 9 years ago

We ended up merging a slightly different approach with #131. Thanks for this contribution, @mrmakeit! I learned a lot from it. :smile: