Module: Vert::Health::ControllerMixin

Extended by:
ActiveSupport::Concern
Included in:
Controller
Defined in:
lib/vert/health/routes.rb

Instance Method Summary collapse

Instance Method Details

#liveObject



29
30
31
# File 'lib/vert/health/routes.rb', line 29

def live
  render json: Vert::Health.liveness, status: :ok
end

#readyObject



33
34
35
36
37
# File 'lib/vert/health/routes.rb', line 33

def ready
  result = Vert::Health.readiness
  status = result[:status] == "ready" ? :ok : :service_unavailable
  render json: result, status: status
end

#showObject



23
24
25
26
27
# File 'lib/vert/health/routes.rb', line 23

def show
  result = Vert::Health.check_all
  status = result[:status] == "healthy" ? :ok : :service_unavailable
  render json: result, status: status
end