class OneApm::Agent::Restart

Public Class Methods

new(events) click to toggle source
# File lib/one_apm/agent/agent/restart.rb, line 7
def initialize(events)
  events.subscribe(:agent_restart, &method(:restart))
end

Public Instance Methods

restart() click to toggle source
# File lib/one_apm/agent/agent/restart.rb, line 11
def restart
  OneApm::Manager.logger.info "Restarting Agent..."
  OneApm::Manager.restart
  OneApm::Manager.logger.info "Restarted Agent done."
end