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
289 290 291 292 |
# File 'lib/brainzlab/utilities/health_check.rb', line 289 def live # Liveness probe - just check if the app is running render json: { status: 'ok', timestamp: Time.now.utc.iso8601 } end |
#ready ⇒ Object
294 295 296 297 298 299 |
# File 'lib/brainzlab/utilities/health_check.rb', line 294 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
283 284 285 286 287 |
# File 'lib/brainzlab/utilities/health_check.rb', line 283 def show result = HealthCheck.run status = result[:status] == 'healthy' ? :ok : :service_unavailable render json: result, status: status end |