Class: RailsHealthChecks::LiveController

Inherits:
ApplicationController show all
Defined in:
app/controllers/rails_health_checks/live_controller.rb

Instance Method Summary collapse

Methods included from Authentication

#authenticate!

Instance Method Details

#showObject



5
6
7
8
9
10
11
12
# File 'app/controllers/rails_health_checks/live_controller.rb', line 5

def show
  builder = ResponseBuilder.new(run_checks(RailsHealthChecks.configuration.checks))
  if builder.overall_status == "ok"
    render plain: "OK", status: :ok
  else
    render plain: "Service Unavailable", status: :service_unavailable
  end
end