Class: Resqued::Config::AfterFork
- Defined in:
- lib/resqued/config/after_fork.rb
Overview
A config handler that executes the ‘after_fork` block.
after_fork do |resque_worker|
# Runs in each worker.
end
Instance Method Summary collapse
-
#after_fork {|@resque_worker| ... } ⇒ Object
DSL: execute the ‘after_fork` block.
-
#initialize(options = {}) ⇒ AfterFork
constructor
Public.
Methods inherited from Base
Methods included from Dsl
#before_fork, #queue, #worker, #worker_factory, #worker_pool
Constructor Details
#initialize(options = {}) ⇒ AfterFork
Public.
12 13 14 |
# File 'lib/resqued/config/after_fork.rb', line 12 def initialize( = {}) @resque_worker = .fetch(:worker) end |
Instance Method Details
#after_fork {|@resque_worker| ... } ⇒ Object
DSL: execute the ‘after_fork` block.
17 18 19 |
# File 'lib/resqued/config/after_fork.rb', line 17 def after_fork yield @resque_worker end |