Method: Sensu::Server::Process#setup_check_request_publisher

Defined in:
lib/sensu/server/process.rb

#setup_check_request_publisherObject

Set up the check request publisher. This method creates an array of check definitions, that are not standalone checks, and do not have ‘:publish` set to `false`. The array of check definitions includes those from standard checks and extensions (with a defined execution `:interval`). The array is provided to the `schedule_check_executions()` method.



692
693
694
695
696
697
698
699
700
701
# File 'lib/sensu/server/process.rb', line 692

def setup_check_request_publisher
  @logger.debug("scheduling check requests")
  standard_checks = @settings.checks.reject do |check|
    check[:standalone] || check[:publish] == false
  end
  extension_checks = @extensions.checks.reject do |check|
    check[:standalone] || check[:publish] == false || !check[:interval].is_a?(Integer)
  end
  schedule_check_executions(standard_checks + extension_checks)
end