mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Add in redis health check
This commit is contained in:
@@ -38,6 +38,16 @@ io.configure ->
|
||||
#io.enable('browser client gzip')
|
||||
io.set('transports', ['websocket', 'flashsocket', 'htmlfile', 'xhr-polling', 'jsonp-polling'])
|
||||
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.configure(app, io, sessionSockets)
|
||||
|
||||
@@ -20,9 +20,6 @@ module.exports = Router =
|
||||
app.get "/clients", HttpController.getConnectedClients
|
||||
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) ->
|
||||
if error?
|
||||
logger.err err: error, "error when client connected"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"express-session": "^1.9.1",
|
||||
"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",
|
||||
"redis-sharelatex": "~0.0.4",
|
||||
"redis-sharelatex": "0.0.9",
|
||||
"session.socket.io": "^0.1.6",
|
||||
"settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.0.0",
|
||||
"socket.io": "0.9.16",
|
||||
|
||||
Reference in New Issue
Block a user