mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
send health check to pubsub channel and use different var name
This commit is contained in:
parent
eadef7b133
commit
1038c5cd0d
1 changed files with 3 additions and 3 deletions
|
@ -134,15 +134,15 @@ if Settings.forceDrainMsDelay?
|
|||
if Settings.continualPubsubTraffic
|
||||
console.log "continualPubsubTraffic enabled"
|
||||
|
||||
redisClients = [redis.createClient(Settings.redis.documentupdater), redis.createClient(Settings.redis.realtime)]
|
||||
redisClients = [redis.createClient(Settings.redis.documentupdater), redis.createClient(Settings.redis.pubsub)]
|
||||
|
||||
publishJob = (channel, callback)->
|
||||
checker = new HealthCheckManager(channel)
|
||||
logger.debug {channel:channel}, "sending pub to keep connection alive"
|
||||
json = JSON.stringify({health_check:true, key: checker.id, date: new Date().toString()})
|
||||
jobs = _.map redisClients, (rclient)->
|
||||
jobs = _.map redisClients, (checkRclient)->
|
||||
return (cb)->
|
||||
rclient.publish channel, json, (err)->
|
||||
checkRclient.publish channel, json, (err)->
|
||||
if err?
|
||||
logger.err {err, channel}, "error publishing pubsub traffic to redis"
|
||||
return cb(err)
|
||||
|
|
Loading…
Reference in a new issue