Class: Resqued::Config::BeforeFork
- Defined in:
- lib/resqued/config/before_fork.rb
Overview
A config handler that executes the ‘before_fork` block.
before_fork do
# Runs once, before forking all the workers.
end
Instance Method Summary collapse
-
#before_fork {|@resqued| ... } ⇒ Object
DSL: Execute the ‘before_fork` block.
-
#initialize(options = {}) ⇒ BeforeFork
constructor
A new instance of BeforeFork.
Methods inherited from Base
Methods included from Dsl
#after_fork, #queue, #worker, #worker_factory, #worker_pool
Constructor Details
#initialize(options = {}) ⇒ BeforeFork
Returns a new instance of BeforeFork.
11 12 13 |
# File 'lib/resqued/config/before_fork.rb', line 11 def initialize( = {}) @resqued = .fetch(:resqued) end |
Instance Method Details
#before_fork {|@resqued| ... } ⇒ Object
DSL: Execute the ‘before_fork` block.
16 17 18 |
# File 'lib/resqued/config/before_fork.rb', line 16 def before_fork yield @resqued end |