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

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.



158
159
160
161
162
163
164
# File 'lib/resque-multi-job-forks.rb', line 158

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.



167
168
169
# File 'lib/resque-multi-job-forks.rb', line 167

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