1
0
Fork 0
mirror of https://github.com/deanpcmad/sidekiq-limit_fetch.git synced 2022-11-09 13:54:36 -05:00

Support process_limits in config

This commit is contained in:
brainopia 2013-06-22 22:23:01 +04:00
parent 7d7d98f3ca
commit 251aedba20

View file

@ -8,7 +8,8 @@ class Sidekiq::LimitFetch
options[:strict] ? strict_order! : weighted_order!
set_limits options[:limits]
set :limit, options[:limits]
set :process_limit, options[:process_limits]
set_blocks options[:blocking]
end
@ -30,10 +31,10 @@ class Sidekiq::LimitFetch
Global::Selector
end
def set_limits(limits)
def set(limit_type, limits)
return unless limits
limits.each do |name, limit|
Sidekiq::Queue[name].limit = limit
Sidekiq::Queue[name].send "#{limit_type}=", limit
end
end