Class: BrainzLab::Utilities::HealthCheck::HealthController
- Inherits:
-
ActionController::API
- Object
- ActionController::API
- BrainzLab::Utilities::HealthCheck::HealthController
- Defined in:
- lib/brainzlab/utilities/health_check.rb
Instance Method Summary collapse
Instance Method Details
#live ⇒ Object
287 288 289 290 |
# File 'lib/brainzlab/utilities/health_check.rb', line 287 def live # Liveness probe - just check if the app is running render json: { status: 'ok', timestamp: Time.now.utc.iso8601 } end |
#ready ⇒ Object
292 293 294 295 296 297 |
# File 'lib/brainzlab/utilities/health_check.rb', line 292 def ready # Readiness probe - check critical dependencies result = HealthCheck.run(checks: %i[database redis]) status = result[:status] == 'healthy' ? :ok : :service_unavailable render json: result, status: status end |
#show ⇒ Object
281 282 283 284 285 |
# File 'lib/brainzlab/utilities/health_check.rb', line 281 def show result = HealthCheck.run status = result[:status] == 'healthy' ? :ok : :service_unavailable render json: result, status: status end |