sidekiq-throttled
sidekiq-throttled copied to clipboard
Add dynamic cooldown policies
Allow Config#cooldown_period
and Config#cooldown_threshold
to be specified as Proc:
Sidekiq::Throttled.configure do |c|
c.cooldown_period = lambda do |queue_name|
queue_name == "default" ? 2.0 : 10.0
end
c.cooldown_threshold = lambda do |queue_name|
queue_name == "mostly-throttled" ? 0 : 10
end
end
This will go very well in pair with planned push-back strategies PR.