mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
logs out when a redis event occurs
This commit is contained in:
parent
b63fc66588
commit
e9efd6b93b
1 changed files with 9 additions and 0 deletions
|
@ -138,6 +138,15 @@ shutdownCleanly = (signal) ->
|
|||
process.exit()
|
||||
, 10000
|
||||
|
||||
watchForEvent = (eventName)->
|
||||
docUpdaterRedisClient.on eventName, (e)->
|
||||
console.log "redis event: #{eventName} #{e}"
|
||||
|
||||
events = ["connect", "ready", "error", "close", "reconnecting", "end"]
|
||||
for eventName in events
|
||||
watchForEvent(eventName)
|
||||
|
||||
|
||||
port = Settings.internal?.documentupdater?.port or Settings.apis?.documentupdater?.port or 3003
|
||||
host = Settings.internal.documentupdater.host or "localhost"
|
||||
if !module.parent # Called directly
|
||||
|
|
Loading…
Reference in a new issue