class Monitors::ResponseTime
Public Class Methods
check_interval()
click to toggle source
# File lib/monitors/response_time.rb, line 21 def check_interval Cfg.response_time_check_interval end
perform_check()
click to toggle source
# File lib/monitors/response_time.rb, line 8 def perform_check all_processes_ok = true running_instances.each do |p| if ViolationsRecorders::ResponseTime.is_violating?(p) all_processes_ok = false log "process #{p} had a response time violation" Phantom::Manager.restart(p) end end log "All response time are ok" if all_processes_ok end