Class: JobManager::ApplicationConfig

Inherits:
ConfigToolkit::BaseConfig
  • Object
show all
Defined in:
lib/jobmanager/applicationconfig.rb

Overview

This class is a configuration class used to represent the combination of the configurations specified in the jobmanager application’s configuration file and the the jobmanager application’s command line arguments.

Constant Summary collapse

EMAIL_CONDITIONS =
[ :always, :never, :on_failure, :on_job_output_or_failure ]
CENTRAL_LOG_MODES =
[ :syslog, :file ]

Instance Method Summary collapse

Instance Method Details

#validate_all_valuesObject



88
89
90
91
92
93
94
95
96
# File 'lib/jobmanager/applicationconfig.rb', line 88

def validate_all_values()
  if (self.central_log_mode == :file && !self.central_log_file?)
    raise_error("If central_log_mode is set to file, central_log_file must be specified.")
  end
  
  if (self.central_log_mode == :syslog && self.central_log_file?)
    raise_error("If central_log_mode is set to syslog, central_log_file should not be specified.")
  end
end