Method: Eye::Process::Config#update_config

Defined in:
lib/eye/process/config.rb

#update_config(new_config = {}) ⇒ Object



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/eye/process/config.rb', line 62

def update_config(new_config = {})
  new_config = prepare_config(new_config)
  @config = new_config
  @full_name = nil
  @logger = nil

  debug { "updating config to: #{@config.inspect}" }

  remove_triggers
  add_triggers

  if up?
    # rebuild checks for this process
    remove_watchers
    remove_children

    add_watchers
    add_children
  end
end