Module: CarrierWave::Backgrounder::Support::Backends::ClassMethods

Defined in:
lib/backgrounder/support/backends.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#queue_optionsObject (readonly)

Returns the value of attribute queue_options.



11
12
13
# File 'lib/backgrounder/support/backends.rb', line 11

def queue_options
  @queue_options
end

Instance Method Details

#backend(queue_name = nil, args = {}) ⇒ Object



13
14
15
16
17
# File 'lib/backgrounder/support/backends.rb', line 13

def backend(queue_name=nil, args={})
  return @backend if @backend
  @queue_options = args
  @backend = queue_name
end

#enqueue_for_backend(worker, class_name, subject_id, mounted_as) ⇒ Object



19
20
21
# File 'lib/backgrounder/support/backends.rb', line 19

def enqueue_for_backend(worker, class_name, subject_id, mounted_as)
  self.send :"enqueue_#{backend}", worker, class_name, subject_id, mounted_as
end