Class: HealthCheckToolbox::HealthController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
lib/health_check_toolbox/health_controller.rb

Instance Method Summary collapse

Instance Method Details

#health_checkObject



10
11
12
13
14
15
16
# File 'lib/health_check_toolbox/health_controller.rb', line 10

def health_check
  status = HealthCheckToolbox::Config.services_status
  render json: {
    timestamp: I18n.l(Time.current, format: :timestamp),
    health_check: [status]
  }
end

#service_statusObject



5
6
7
8
# File 'lib/health_check_toolbox/health_controller.rb', line 5

def service_status
  version = File.read('.version').chomp
  render json: { ok: true, version: version }
end