mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
added redis health check
This commit is contained in:
parent
4f56d8d4e8
commit
db0322e054
2 changed files with 10 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue