Class: Qmin::Strategy::Inline

Inherits:
Object
  • Object
show all
Defined in:
lib/qmin/strategy/inline.rb

Instance Method Summary collapse

Instance Method Details

#background_call(instance, method_name, *args) ⇒ Object

call method directly



10
11
12
13
14
15
16
# File 'lib/qmin/strategy/inline.rb', line 10

def background_call(instance, method_name, *args)
  begin
    instance.send(::Qmin.method_name_for_instance(instance, method_name), *args)
  rescue => e
    ::Qmin::Qmin.current.report(e)
  end
end

#enqueue(worker_class, *args) ⇒ Object

handle job in process



5
6
7
# File 'lib/qmin/strategy/inline.rb', line 5

def enqueue(worker_class, *args)
  worker_class.send :perform, *args
end