Class: Tpt::Rails::HealthChecksController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Tpt::Rails::HealthChecksController
- Defined in:
- app/controllers/tpt/rails/health_checks_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/tpt/rails/health_checks_controller.rb', line 4 def index results = Tpt::Rails.config.health_checks.check healthy = results.values.all? code = healthy ? 200 : 500 render( status: code, json: { healthy: healthy, checks: results, }, ) end |