Class: Sidekiq::LimitFetch

Inherits:
Object
  • Object
show all
Defined in:
lib/sidekiq/limit_fetch/queues.rb,
lib/sidekiq/limit_fetch.rb

Defined Under Namespace

Modules: Global, Local, Singleton Classes: Queues, UnitOfWork

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ LimitFetch

Returns a new instance of LimitFetch.



21
22
23
24
# File 'lib/sidekiq/limit_fetch.rb', line 21

def initialize(options)
  Global::Monitor.start! if options[:global]
  @queues = Queues.new options
end

Class Method Details

.bulk_requeue(jobs) ⇒ Object



17
18
19
# File 'lib/sidekiq/limit_fetch.rb', line 17

def self.bulk_requeue(jobs)
  Sidekiq::BasicFetch.bulk_requeue jobs
end

Instance Method Details

#retrieve_workObject



26
27
28
29
# File 'lib/sidekiq/limit_fetch.rb', line 26

def retrieve_work
  queue, message = fetch_message
  UnitOfWork.new queue, message if message
end