-
Notifications
You must be signed in to change notification settings - Fork 75
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
Specify key to limit on #2
Comments
There's a way to create "shared" strategies: # config/initializers/sidekiq-throttled.rb
Sidekiq::Throttled::Registry.add(:tvdb, {
:threshold => { :limit => 20, :period => 1.minute }
})
# app/jobs/latest_updates_worker.rb
class LatestUpdatesWorker
include Sidekiq::Worker
include Sidekiq::Throttled::Worker
sidekiq_throttle_as :tvdb
# ...
end |
And ability to be a key lambda from job args |
Dynamic configuration (key/limit/period) is not available ATM. |
I have created separate issue ( #4 ) to discuss dynamic options. |
As it's already a way to specific keys. Then I guess my question got answered. Thanks! |
Hi!
Is it possible for you to look into a way to specify what key to throttle it on?
At the moment i'm using Sidekiq-throttler which does it via:
sidekiq_options throttle: { threshold: 20, period: 1.minute, key: 'tvdb' }
The text was updated successfully, but these errors were encountered: