lib/sensu/server/process.rb
def calculate_check_request_splay(check)
        splay_hash = Digest::MD5.digest(check[:name]).unpack('Q<').first
        current_time = (Time.now.to_f * 1000).to_i
        (splay_hash - current_time) % (check[:interval] * 1000) / 1000.0
      end
# Calculate a check request splay, taking into account the
# current time and the request interval to ensure it's
# consistent between process restarts.
#
# @param check [Hash] definition.
Calculate a check request splay, taking into account the
current time and the request interval to ensure it's
consistent between process restarts.
Calculate a check request splay taking into account the current time and the request interval to ensure it ' s consistent between process restarts .
def calculate_check_request_splay(check)
        splay_hash = Digest::MD5.digest(check[:name]).unpack('Q<').first
        current_time = (Time.now.to_f * 1000).to_i
        (splay_hash - current_time) % (check[:interval] * 1000) / 1000.0
      end
def calculate_check_request_splay ( check ) splay_hash = Digest :: MD5 . digest ( check [ :name ] ) . unpack ( 'Q<' ) . first current_time = ( Time . now . to_f * 1000 ) . to_i ( splay_hash - current_time ) % ( check [ :interval ] * 1000 ) / 1000.0 end
Calculate a check request splay, taking into account the
current time and the request interval to ensure it's
consistent between process restarts.
Calculate a check request splay taking into account the current time and the request interval to ensure it ' s consistent between process restarts .
check
None