lib/sensu/server/process.rb
# Schedule check requests, using the check interval. This method
# using an intial calculated request splay EventMachine timer
# and an EventMachine periodic timer for subsequent check
# requests. The timers are stored in the timers hash under
# `:tasks`, so they can be cancelled etc.
#
# @param check [Hash] definition.
Schedule check requests, using the check interval. This method
using an intial calculated request splay EventMachine timer
and an EventMachine periodic timer for subsequent check
requests. The timers are stored in the timers hash under
`:tasks`, so they can be cancelled etc.
Schedule check requests using the check interval . This method using an intial calculated request splay EventMachine timer and an EventMachine periodic timer for subsequent check requests . The timers are stored in the timers hash under ` : tasks ` so they can be cancelled etc .
def schedule_check_interval_requests(check)
        request_splay = testing? ? 0 : calculate_check_request_splay(check)
        interval = testing? ? 0.5 : check[:interval]
        @timers[:tasks][:check_request_publisher] << EM::Timer.new(request_splay) do
          create_check_request = create_check_request_proc(check)
          create_check_request.call
          @timers[:tasks][:check_request_publisher] << EM::PeriodicTimer.new(interval, &create_check_request)
        end
      end
def schedule_check_interval_requests ( check ) request_splay = testing? ? 0 : calculate_check_request_splay ( check ) interval = testing? ? 0.5 : check [ :interval ] @timers [ :tasks ] [ :check_request_publisher ] << EM :: Timer . new ( request_splay ) do create_check_request = create_check_request_proc ( check ) create_check_request . call @timers [ :tasks ] [ :check_request_publisher ] << EM :: PeriodicTimer . new ( interval , & create_check_request ) end end
Schedule check requests, using the check interval.
Schedule check requests using the check interval .
check
None