Class: HealthcheckController
- Inherits:
-
ApplicationController
- Object
- ActionController::API
- ApplicationController
- HealthcheckController
- Defined in:
- app/controllers/healthcheck_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 18 19 20 |
# File 'app/controllers/healthcheck_controller.rb', line 4 def index render json: { status: "OK", sidekiq_redis: Sidekiq.redis_info["redis_version"], lock_manager_redis: LockManager.redis_client.info["redis_version"], mongodb: { nodes: Node.count, slots: Slot.count, pending_tasks: Task.where(status: "waiting").count } } rescue StandardError => e render json: { status: "ERROR", message: "#{e.class}: #{e.}" } end |