added redis health check

This commit is contained in:
Henry Oswald 2014-11-20 11:40:52 +00:00
parent 4f56d8d4e8
commit db0322e054
2 changed files with 10 additions and 1 deletions

View file

@ -57,6 +57,15 @@ app.get '/status', (req, res)->
else
res.send('document updater is alive')
redisCheck = require("redis-sharelatex").activeHealthCheckRedis(Settings.redis.web)
app.get "/health_check/redis", (req, res, next)->
if redisCheck.isAlive()
res.send 200
else
res.send 500
app.use (error, req, res, next) ->
logger.error err: error, "request errored"
if error instanceof Errors.NotFoundError

View file

@ -21,7 +21,7 @@
"metrics-sharelatex": "git+https://github.com/sharelatex/metrics-sharelatex.git#v1.0.0",
"sinon": "~1.5.2",
"mongojs": "0.9.11",
"redis-sharelatex": "~0.0.4"
"redis-sharelatex": "0.0.8"
},
"devDependencies": {
"grunt-execute": "~0.1.5",