Class: Resque::Job

Inherits:
Object
  • Object
show all
Defined in:
lib/marginalia-resque.rb

Class Method Summary collapse

Class Method Details

.create_with_marginalia(queue, klass, *args) ⇒ Object



27
28
29
30
31
32
33
34
35
36
# File 'lib/marginalia-resque.rb', line 27

def create_with_marginalia(queue, klass, *args)
  if Resque.inline?
    Marginalia::Resque.update_with_job!(klass, args)
    ret = create_without_marginalia(queue, klass, *args)
    Marginalia::Resque.clear_after_job!
    ret
  else
    create_without_marginalia(queue, klass, *args)
  end
end