From 055cb558729616e2b25c6a9ead4bdfe47d4ccbcb Mon Sep 17 00:00:00 2001 From: Kane York Date: Fri, 6 Mar 2020 15:15:55 -0800 Subject: [PATCH] DEV: shutdown_ok parameter to /srv/status This allows probers to distinguish between liveness and readiness conditions --- app/controllers/forums_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb index 7192c59dd1a..d11efb4b437 100644 --- a/app/controllers/forums_controller.rb +++ b/app/controllers/forums_controller.rb @@ -10,7 +10,7 @@ class ForumsController < ActionController::Base def status if $shutdown # rubocop:disable Style/GlobalVars - render plain: "shutting down", status: 500 + render plain: "shutting down", status: (params[:shutdown_ok] ? 200 : 500) else render plain: "ok" end