Module: Backburner::Performable::InstanceMethods

Defined in:
lib/backburner/performable.rb

Instance Method Summary collapse

Instance Method Details

#async(opts = {}) ⇒ Object

Return proxy object to enqueue jobs for object Options: ‘pri` (priority), `delay` (delay in secs), `ttr` (time to respond), `queue` (queue name)

Examples:

@model.async(:pri => 1000).do_something("foo")


15
16
17
# File 'lib/backburner/performable.rb', line 15

def async(opts={})
  Backburner::AsyncProxy.new(self.class, self.id, opts)
end