Module: ActsAsAsync::Helper

Extended by:
ActiveSupport::Concern
Defined in:
lib/acts_as_async/helper.rb

Defined Under Namespace

Modules: ClassMethods, SharedMethods

Instance Method Summary collapse

Instance Method Details

#async(method, *args) ⇒ Object



47
48
49
# File 'lib/acts_as_async/helper.rb', line 47

def async(method, *args)
  Resque.enqueue(self.class, id, method, *args)
end

#async_at(time, method, *args) ⇒ Object



51
52
53
# File 'lib/acts_as_async/helper.rb', line 51

def async_at(time, method, *args)
  Resque.enqueue_at(time, self.class, id, method, *args)
end

#async_in(time, method, *args) ⇒ Object



55
56
57
# File 'lib/acts_as_async/helper.rb', line 55

def async_in(time, method, *args)
  Resque.enqueue_in(time, self.class, id, method, *args)
end