lib/sensu/client/process.rb
# Schedule a check execution, using the check cron. This method
# determines the time until the next cron time (in seconds) and
# creats an EventMachine timer for the execution. This method
# will be called after every check cron execution for subsequent
# executions. The timer is stored in the timers hash under
# `:run`, so it can be cancelled etc. The check cron execution
# timer object is removed from the timer hash after the
# execution, to stop the timer hash from growing infinitely.
#
# @param check [Hash] definition.
Schedule a check execution, using the check cron. This method
determines the time until the next cron time (in seconds) and
creats an EventMachine timer for the execution. This method
will be called after every check cron execution for subsequent
executions. The timer is stored in the timers hash under
`:run`, so it can be cancelled etc. The check cron execution
timer object is removed from the timer hash after the
execution, to stop the timer hash from growing infinitely.
Schedule a check execution using the check cron . This method determines the time until the next cron time ( in seconds ) and creats an EventMachine timer for the execution . This method will be called after every check cron execution for subsequent executions . The timer is stored in the timers hash under ` : run ` so it can be cancelled etc . The check cron execution timer object is removed from the timer hash after the execution to stop the timer hash from growing infinitely .
def schedule_check_cron_execution(check)
        cron_time = determine_check_cron_time(check)
        @timers[:run] << EM::Timer.new(cron_time) do |timer|
          create_check_execution_proc(check).call
          @timers[:run].delete(timer)
          schedule_check_cron_execution(check)
        end
      end
def schedule_check_cron_execution ( check ) cron_time = determine_check_cron_time ( check ) @timers [ :run ] << EM :: Timer . new ( cron_time ) do | timer | create_check_execution_proc ( check ) . call @timers [ :run ] . delete ( timer ) schedule_check_cron_execution ( check ) end end
Schedule a check execution, using the check cron.
Schedule a check execution using the check cron .
check
None