DEV: shutdown_ok parameter to /srv/status

This allows probers to distinguish between liveness and readiness conditions
This commit is contained in:
Kane York 2020-03-06 15:15:55 -08:00 committed by Kane York
parent ec21a15fa7
commit 055cb55872
1 changed files with 1 additions and 1 deletions

View File

@ -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