Module: Resqued::Config::Dsl

Included in:
Base
Defined in:
lib/resqued/config/dsl.rb

Overview

Defines the DSL for resqued config files.

Each subclass should override parts of the dsl that it cares about.

Instance Method Summary collapse

Instance Method Details

#after_exit(&block) ⇒ Object

Public: Define a block to be run once after each worker exits.



16
17
# File 'lib/resqued/config/dsl.rb', line 16

def after_exit(&block)
end

#after_fork(&block) ⇒ Object

Public: Define a block to be run in each worker.



12
13
# File 'lib/resqued/config/dsl.rb', line 12

def after_fork(&block)
end

#before_fork(&block) ⇒ Object

Public: Define a block to be run once, before forking all the workers.



8
9
# File 'lib/resqued/config/dsl.rb', line 8

def before_fork(&block)
end

#queue(*queues) ⇒ Object

Public: Define the queues worked by members of the worker pool.



32
33
# File 'lib/resqued/config/dsl.rb', line 32

def queue(*queues)
end

#worker(*queues) ⇒ Object

Public: Define a worker that will work on a queue.



20
21
# File 'lib/resqued/config/dsl.rb', line 20

def worker(*queues)
end

#worker_factory(&block) ⇒ Object

Public: Define a factory Proc that creates Resque::Workers



28
29
# File 'lib/resqued/config/dsl.rb', line 28

def worker_factory(&block)
end

#worker_pool(count, *queues_and_options) ⇒ Object

Public: Define a pool of workers that will work ‘*’, or the queues specified by ‘queue`.



24
25
# File 'lib/resqued/config/dsl.rb', line 24

def worker_pool(count, *queues_and_options)
end