lib/sensu/client/process.rb
def schedule_check_interval_executions(check)
        execution_splay = testing? ? 0 : calculate_check_execution_splay(check)
        interval = testing? ? 0.5 : check[:interval]
        @timers[:run] << EM::Timer.new(execution_splay) do
          execute_check = create_check_execution_proc(check)
          execute_check.call
          @timers[:run] << EM::PeriodicTimer.new(interval, &execute_check)
        end
      end
# Schedule check executions, using the check interval. This
# method using an intial calculated execution splay EventMachine
# timer and an EventMachine periodic timer for subsequent check
# executions. The timers are stored in the timers hash under
# `:run`, so they can be cancelled etc.
#
# @param check [Hash] definition.
Schedule check executions, using the check interval. This
method using an intial calculated execution splay EventMachine
timer and an EventMachine periodic timer for subsequent check
executions. The timers are stored in the timers hash under
`:run`, so they can be cancelled etc.
Schedule check executions using the check interval . This method using an intial calculated execution splay EventMachine timer and an EventMachine periodic timer for subsequent check executions . The timers are stored in the timers hash under ` : run ` so they can be cancelled etc .
def schedule_check_interval_executions(check)
        execution_splay = testing? ? 0 : calculate_check_execution_splay(check)
        interval = testing? ? 0.5 : check[:interval]
        @timers[:run] << EM::Timer.new(execution_splay) do
          execute_check = create_check_execution_proc(check)
          execute_check.call
          @timers[:run] << EM::PeriodicTimer.new(interval, &execute_check)
        end
      end
def schedule_check_interval_executions ( check ) execution_splay = testing? ? 0 : calculate_check_execution_splay ( check ) interval = testing? ? 0.5 : check [ :interval ] @timers [ :run ] << EM :: Timer . new ( execution_splay ) do execute_check = create_check_execution_proc ( check ) execute_check . call @timers [ :run ] << EM :: PeriodicTimer . new ( interval , & execute_check ) end end
Schedule check executions, using the check interval.
Schedule check executions using the check interval .
check
None