From 5b54d36b375e82488e63eadee35512fe683c4fd5 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Tue, 13 Aug 2019 10:41:35 +0100 Subject: [PATCH] fail readiness check when shutting down --- services/real-time/app.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/real-time/app.coffee b/services/real-time/app.coffee index 7b53730ce6..56db154f83 100644 --- a/services/real-time/app.coffee +++ b/services/real-time/app.coffee @@ -56,7 +56,10 @@ app.get "/", (req, res, next) -> res.send "real-time-sharelatex is alive" app.get "/status", (req, res, next) -> - res.send "real-time-sharelatex is alive" + if shutDownInProgress + res.send 503 # Service unavailable + else + res.send "real-time-sharelatex is alive" app.get "/debug/events", (req, res, next) -> Settings.debugEvents = parseInt(req.query?.count,10) || 20