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

Raises:



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

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

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

Raises:



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

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

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

Raises:



57
58
59
60
# File 'lib/acts_as_async/helper.rb', line 57

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