mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Add in redis health check
This commit is contained in:
parent
4d691cf543
commit
2a05045600
3 changed files with 11 additions and 4 deletions
|
@ -38,6 +38,16 @@ io.configure ->
|
||||||
#io.enable('browser client gzip')
|
#io.enable('browser client gzip')
|
||||||
io.set('transports', ['websocket', 'flashsocket', 'htmlfile', 'xhr-polling', 'jsonp-polling'])
|
io.set('transports', ['websocket', 'flashsocket', 'htmlfile', 'xhr-polling', 'jsonp-polling'])
|
||||||
io.set('log level', 1)
|
io.set('log level', 1)
|
||||||
|
|
||||||
|
app.get "/status", (req, res, next) ->
|
||||||
|
res.send "real-time-sharelatex is alive"
|
||||||
|
|
||||||
|
redisCheck = redis.activeHealthCheckRedis(Settings.redis.web)
|
||||||
|
app.get "/health_check/redis", (req, res, next) ->
|
||||||
|
if redisCheck.isAlive()
|
||||||
|
res.send 200
|
||||||
|
else
|
||||||
|
res.send 500
|
||||||
|
|
||||||
Router = require "./app/js/Router"
|
Router = require "./app/js/Router"
|
||||||
Router.configure(app, io, sessionSockets)
|
Router.configure(app, io, sessionSockets)
|
||||||
|
|
|
@ -20,9 +20,6 @@ module.exports = Router =
|
||||||
app.get "/clients", HttpController.getConnectedClients
|
app.get "/clients", HttpController.getConnectedClients
|
||||||
app.get "/clients/:client_id", HttpController.getConnectedClient
|
app.get "/clients/:client_id", HttpController.getConnectedClient
|
||||||
|
|
||||||
app.get "/status", (req, res, next) ->
|
|
||||||
res.send "real-time-sharelatex is alive"
|
|
||||||
|
|
||||||
session.on 'connection', (error, client, session) ->
|
session.on 'connection', (error, client, session) ->
|
||||||
if error?
|
if error?
|
||||||
logger.err err: error, "error when client connected"
|
logger.err err: error, "error when client connected"
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
"express-session": "^1.9.1",
|
"express-session": "^1.9.1",
|
||||||
"logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#v1.0.0",
|
"logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#v1.0.0",
|
||||||
"metrics-sharelatex": "git+https://github.com/sharelatex/metrics-sharelatex.git#v1.0.0",
|
"metrics-sharelatex": "git+https://github.com/sharelatex/metrics-sharelatex.git#v1.0.0",
|
||||||
"redis-sharelatex": "~0.0.4",
|
"redis-sharelatex": "0.0.9",
|
||||||
"session.socket.io": "^0.1.6",
|
"session.socket.io": "^0.1.6",
|
||||||
"settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.0.0",
|
"settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.0.0",
|
||||||
"socket.io": "0.9.16",
|
"socket.io": "0.9.16",
|
||||||
|
|
Loading…
Reference in a new issue