Module: Ruote::Resque
- Defined in:
- lib/ruote/resque.rb,
lib/ruote/resque/job.rb,
lib/ruote/resque/client.rb,
lib/ruote/resque/version.rb,
lib/ruote/resque/receiver.rb,
lib/ruote/resque/reply_job.rb,
lib/ruote/resque/participant_registrar.rb
Overview
Ruote::Resque allows a Ruote engine to delegates the work of it's participants to Resque workers.
Common use cases include:
- You run a lot of jobs and need the reliability of Resque to process your jobs
- You have a Resque system you need to integrate with
- You want a separation of concerns between process orchestration and actual execution
See the README for usage instructions
Defined Under Namespace
Modules: Job, ReplyJob Classes: Configuration, InvalidJob, InvalidWorkitem, Participant, ParticipantRegistrar, Receiver
Constant Summary collapse
- VERSION =
'0.1.0'
Class Attribute Summary collapse
-
.configuration ⇒ Object
Returns the current Configuration.
Class Method Summary collapse
-
.configure {|Configuration| ... } ⇒ void
This method allows you to customize the ruote-resque configuration.
-
.logger ⇒ Logger
The logger to be used inside ruote-resque.
-
.register(dashboard, &block) ⇒ void
Registers resque participants using a DSL.
-
.reply(*args) ⇒ Object
Enqueues a ReplyJob with the given arguments.
Class Attribute Details
.configuration ⇒ Object
Returns the current Configuration
30 31 32 |
# File 'lib/ruote/resque/client.rb', line 30 def configuration @configuration end |
Class Method Details
.configure {|Configuration| ... } ⇒ void
This method returns an undefined value.
This method allows you to customize the ruote-resque configuration.
49 50 51 52 |
# File 'lib/ruote/resque/client.rb', line 49 def configure self.configuration ||= Ruote::Resque::Configuration.new yield(configuration) if block_given? end |
.logger ⇒ Logger
Returns the logger to be used inside ruote-resque.
41 42 43 |
# File 'lib/ruote/resque/client.rb', line 41 def logger configuration.logger end |
.register(dashboard, &block) ⇒ void
This method returns an undefined value.
Registers resque participants using a DSL.
34 35 36 37 |
# File 'lib/ruote/resque.rb', line 34 def self.register(dashboard, &block) registrar = Ruote::Resque::ParticipantRegistrar.new(dashboard) registrar.instance_eval(&block) end |