Module: Resque

Defined in:
lib/resqovery.rb

Class Method Summary collapse

Class Method Details

.safe_enqueue(*args, &block) ⇒ Object



5
6
7
8
9
10
# File 'lib/resqovery.rb', line 5

def self.safe_enqueue(*args, &block)
  classname = *args[0].to_s
  params = *args[1..-1]
  id = Resqovery.defaults[:model_name].constantize.create( {:classname => classname , :args => params, :is_executed => false} ).id
  self.enqueue(*args+[id], &block)
end