Created
December 19, 2011 08:45
-
-
Save biot023/1496134 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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