From b5564095f35975b1bbf76790556c5561d858dbc3 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Thu, 7 Feb 2019 15:10:40 +0000 Subject: [PATCH] add /health_check/redis route back in --- services/document-updater/app.coffee | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/services/document-updater/app.coffee b/services/document-updater/app.coffee index a22a552d59..04f884930e 100644 --- a/services/document-updater/app.coffee +++ b/services/document-updater/app.coffee @@ -71,7 +71,16 @@ app.get '/status', (req, res)-> else res.send('document updater is alive') + docUpdaterRedisClient = require("redis-sharelatex").createClient(Settings.redis.documentupdater) +app.get "/health_check/redis", (req, res, next) -> + docUpdaterRedisClient.healthCheck (error) -> + if error? + logger.err {err: error}, "failed redis health check" + res.send 500 + else + res.send 200 + app.get "/health_check/redis_cluster", (req, res, next) -> docUpdaterRedisClient.healthCheck (error) -> if error?