Module: Sidekiq::Manager::InitLimitFetch

Included in:
Sidekiq::Manager
Defined in:
lib/sidekiq/extensions/manager.rb

Instance Method Summary collapse

Instance Method Details

#initialize(capsule_or_options) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/sidekiq/extensions/manager.rb', line 6

def initialize(capsule_or_options)
  if Sidekiq::LimitFetch.post_7?
    capsule_or_options.config[:fetch_class] = Sidekiq::LimitFetch
  else
    capsule_or_options[:fetch] = Sidekiq::LimitFetch
  end
  super
end

#startObject



15
16
17
18
19
20
# File 'lib/sidekiq/extensions/manager.rb', line 15

def start
  # In sidekiq 6.5.0 the variable @options has been renamed to @config
  Sidekiq::LimitFetch::Queues.start @options || @config
  Sidekiq::LimitFetch::Global::Monitor.start!
  super
end