mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-25 16:11:28 +00:00
log out when health check manager fails a check
This commit is contained in:
parent
2992c63c4f
commit
421a914e72
1 changed files with 3 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
metrics = require "metrics-sharelatex"
|
||||
logger = require("logger-sharelatex")
|
||||
|
||||
os = require "os"
|
||||
HOST = os.hostname()
|
||||
|
@ -32,6 +33,8 @@ module.exports = class HealthCheckManager
|
|||
@timer = null # only time the latency of the first event
|
||||
setStatus: () ->
|
||||
# if we saw the event anything other than a single time that is an error
|
||||
if @count != 1
|
||||
logger.err channel:@channel, count:@count, id:@id, "redis channel health check error"
|
||||
error = (@count != 1)
|
||||
CHANNEL_ERROR[@channel] = error
|
||||
|
||||
|
|
Loading…
Reference in a new issue