diff options
author | Gareth Rees <gareth@mysociety.org> | 2014-09-17 17:09:25 +0100 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2014-09-25 12:57:55 +0100 |
commit | 2fdfd7b62e603b5f4d2ff5925a49b2d5ed83bf3b (patch) | |
tree | 2e8d8272beee078367caa4b7d7d8cfa326a3dc2f /app/controllers/health_checks_controller.rb | |
parent | dcd75661164ec372f35fdc7be498e004f8a0b768 (diff) |
Add an action to run the checks
Diffstat (limited to 'app/controllers/health_checks_controller.rb')
-rw-r--r-- | app/controllers/health_checks_controller.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/controllers/health_checks_controller.rb b/app/controllers/health_checks_controller.rb new file mode 100644 index 000000000..473a1aacc --- /dev/null +++ b/app/controllers/health_checks_controller.rb @@ -0,0 +1,16 @@ +class HealthChecksController < ApplicationController + + def index + @health_checks = HealthChecks.all + + respond_to do |format| + if HealthChecks.ok? + format.html { render :action => :index, :layout => false } + else + format.html { render :action => :index, :layout => false , :status => 500 } + end + end + + end + +end |