Class: Flydata::Helper::Action::CheckAbnormalShutdown

Inherits:
BaseAction
  • Object
show all
Defined in:
lib/flydata/helper/action/check_abnormal_shutdown.rb

Instance Attribute Summary

Attributes inherited from BaseAction

#config

Instance Method Summary collapse

Methods inherited from BaseAction

#get_service, #initialize

Constructor Details

This class inherits a constructor from Flydata::Helper::BaseAction

Instance Method Details

#execute(opts = {}) ⇒ Object



8
9
10
11
12
13
# File 'lib/flydata/helper/action/check_abnormal_shutdown.rb', line 8

def execute(opts = {})
  if abnormal_shutdown_occurred?
    log_info "Abnormal shutdown occurred.  Restart the agent."
    yield :restart_agent, nil
  end
end