class Resqued::Config::Configuration

Does the things that the config file says to do.

Public Class Methods

new(config_paths) click to toggle source
# File lib/resqued/config.rb, line 17
def initialize(config_paths)
  @config_data = config_paths.map { |path| { content: File.read(path), path: path } }
end

Public Instance Methods

after_exit(worker_summary) click to toggle source

Public: Perform the ‘after_exit` action from the config.

# File lib/resqued/config.rb, line 32
def after_exit(worker_summary)
  Resqued::Config::AfterExit.new(worker_summary: worker_summary).apply_all(@config_data)
end
after_fork(worker) click to toggle source

Public: Performs the ‘after_fork` action from the config.

# File lib/resqued/config.rb, line 27
def after_fork(worker)
  Resqued::Config::AfterFork.new(worker: worker).apply_all(@config_data)
end
before_fork(resqued) click to toggle source

Public: Performs the ‘before_fork` action from the config.

# File lib/resqued/config.rb, line 22
def before_fork(resqued)
  Resqued::Config::BeforeFork.new(resqued: resqued).apply_all(@config_data)
end
build_workers() click to toggle source

Public: Builds the workers specified in the config.

# File lib/resqued/config.rb, line 37
def build_workers
  Resqued::Config::Worker.new(config: self).apply_all(@config_data)
end