-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I use multiple thresholds in the same worker? #20
Comments
I'm interested in this as well. I have a worker talking to an external API. I have EDIT: This seems to be related to this TODO https://github.com/gevans/sidekiq-throttler/blob/master/lib/sidekiq/throttler/rate_limit.rb#L6 from @gevans |
@rahilsondhi does the |
@dmitry that should work on its own, but this thread is about setting multiple thresholds. I want max 1 per second and max 5000 per hour (two thresholds). |
Yes, I understand. But at least |
For example, Amazon SES initially limits sends to 5 per second, 10000 per day. Can I add multiple thresholds like so:
sidekiq_options throttle: { threshold: 5, period: 1.second }
sidekiq_options throttle: { threshold: 10000, period: 24.hours }
The text was updated successfully, but these errors were encountered: