logs out when a redis event occurs

This commit is contained in:
Henry Oswald 2019-10-03 11:00:24 +01:00
parent b63fc66588
commit e9efd6b93b

View file

@ -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