Module: Creeper::Worker
- Included in:
- Extensions::DelayedMailer, Extensions::DelayedModel
- Defined in:
- lib/creeper/worker.rb,
lib/creeper/testing.rb
Overview
Include this module in your worker class and you can easily create asynchronous jobs:
class HardWorker
include Creeper::Worker
def perform(*args)
# do some work
end
end
Then in your Rails app, you can do this:
HardWorker.perform_async(1, 2, 3)
Note that perform_async is a class method, perform is an instance method.
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
24 25 26 27 |
# File 'lib/creeper/worker.rb', line 24 def self.included(base) base.extend(ClassMethods) base.class_attribute :creeper_options_hash end |