mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
DEV: shutdown_ok parameter to /srv/status
This allows probers to distinguish between liveness and readiness conditions
This commit is contained in:
@ -10,7 +10,7 @@ class ForumsController < ActionController::Base
|
|||||||
|
|
||||||
def status
|
def status
|
||||||
if $shutdown # rubocop:disable Style/GlobalVars
|
if $shutdown # rubocop:disable Style/GlobalVars
|
||||||
render plain: "shutting down", status: 500
|
render plain: "shutting down", status: (params[:shutdown_ok] ? 200 : 500)
|
||||||
else
|
else
|
||||||
render plain: "ok"
|
render plain: "ok"
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user