Преглед изворни кода

fail readiness check when shutting down

Brian Gough пре 7 година
родитељ
комит
5b54d36b37
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      services/real-time/app.coffee

+ 4 - 1
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