Method: Hostmon::Config#reload!
- Defined in:
- lib/hostmon/config.rb
#reload! ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/hostmon/config.rb', line 29 def reload! raw = File.read(@conf_file) raise "failed to load #{@conf_file}" unless yaml = YAML.load(raw) @global_config = yaml[:main] @bugzilla_config = yaml[:bugzilla] || false @amqp_config = yaml[:amqp] || {} # do some sanity checking of other configuration parameters [:report_dir].each do |c| if not @global_config[c] raise "Missing config name '#{c.to_s}'" end end @global_config[:saved_reports] ||= 1 @report_dir = @global_config[:report_dir] end |