Module: Resque
- Defined in:
- lib/resque-multi-job-forks.rb,
lib/resque/plugins/multi_job_forks/rss_reader.rb
Defined Under Namespace
Modules: Plugins Classes: Worker
Class Method Summary collapse
-
.before_child_exit(&block) ⇒ Object
the ‘before_child_exit` hook will run in the child process right before the child process terminates.
-
.before_child_exit=(before_child_exit) ⇒ Object
Set the before_child_exit proc.
Class Method Details
.before_child_exit(&block) ⇒ Object
the ‘before_child_exit` hook will run in the child process right before the child process terminates
Call with a block to set the hook. Call with no arguments to return the hook.
142 143 144 145 146 147 148 |
# File 'lib/resque-multi-job-forks.rb', line 142 def self.before_child_exit(&block) if block @before_child_exit ||= [] @before_child_exit << block end @before_child_exit end |
.before_child_exit=(before_child_exit) ⇒ Object
Set the before_child_exit proc.
151 152 153 |
# File 'lib/resque-multi-job-forks.rb', line 151 def self.before_child_exit=(before_child_exit) @before_child_exit = before_child_exit.respond_to?(:each) ? before_child_exit : [before_child_exit].compact end |