Class: Healthcheck::HealthchecksController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/healthcheck/healthchecks_controller.rb

Instance Method Summary collapse

Instance Method Details

#checkObject



7
8
9
10
11
12
13
14
15
16
17
# File 'app/controllers/healthcheck/healthchecks_controller.rb', line 7

def check
  return Healthcheck.custom!(self) if Healthcheck.custom?

  checker = Healthcheck.check
  response = if checker.errored?
               Healthcheck::Response::Error.new(self, checker)
             else
               Healthcheck::Response::Success.new(self, checker)
             end
  response.execute!
end