Skip to content

Instantly share code, notes, and snippets.

@biot023
Created December 19, 2011 08:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save biot023/1496134 to your computer and use it in GitHub Desktop.
Save biot023/1496134 to your computer and use it in GitHub Desktop.
class HealthCheckController < ApplicationController
##
# GET health-check
#
def index
if Typhoeus::Request.get( "#{ SearchExec.server }/#{ SearchExec.index }/_status" ).success?
render( :text => "OK", :status => 200 )
else
render( :text => "Fail", :status => 500 )
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment