enova / sidekiq-rate-limiter

Redis-backed, per-worker rate limits for job processing.
http://rubygems.org/gems/sidekiq-rate-limiter
MIT License
192 stars 43 forks source link

Add support for Procs in configuration options. #7

Closed sentience closed 10 years ago

sentience commented 10 years ago

This adds support for supplying Procs for each of the :name, :limit/:threshold, and :period/:interval configuration options. Note the caveat documented in my addition to README.md. sidekiq-throttler suffers from this same caveat, and there seems to be no way around it without modifying Sidekiq internals.

sentience commented 10 years ago

Used this in anger on our production server and ran into some hiccups, thus the additional commits above. This is now working smoothly for me, but could probably use some better test coverage.

bwthomas commented 10 years ago

I'm curious about the 'in anger' bit :)

This looks good, I'm merging.