From 421a914e7249aeec0b384d832049dd89ec0cd1c3 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Fri, 31 May 2019 09:15:49 +0100 Subject: [PATCH] log out when health check manager fails a check --- services/real-time/app/coffee/HealthCheckManager.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/real-time/app/coffee/HealthCheckManager.coffee b/services/real-time/app/coffee/HealthCheckManager.coffee index cd6b617b9b..bcd3e2ed07 100644 --- a/services/real-time/app/coffee/HealthCheckManager.coffee +++ b/services/real-time/app/coffee/HealthCheckManager.coffee @@ -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