Method: Atatus.restart

Defined in:
lib/atatus.rb

.restart(config = nil) ⇒ Object

Restarts the Atatus Agent using the same config or a new one, if it is provided. Starts the agent if it is not running. Stops and starts the agent if it is running.



73
74
75
76
77
# File 'lib/atatus.rb', line 73

def restart(config = nil)
  config ||= agent&.config
  stop if running?
  start(config)
end