class OkComputer::Neo4jCheck

Public Instance Methods

check() click to toggle source
# File lib/ok_computer/built_in_checks/neo4j_check.rb, line 3
def check
  begin
    #Checks the connection for a 200
    connected = Neo4j::Session.current.connection.head.success?
    url = Neo4j::Session.current.connection.url_prefix.to_s
    mark_message "Connected to neo4j on #{url}" if connected
  rescue Faraday::ConnectionFailed => e
    mark_failure
    mark_message "Error: #{e.message}"
  end
end