Просмотр исходного кода

Merge pull request #52 from overleaf/ho-increase-redis-err-logging

log out when health check manager fails a check
Henry Oswald 7 лет назад
Родитель
Сommit
c7eb29ab0a
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      services/real-time/app/coffee/HealthCheckManager.coffee

+ 3 - 0
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