From 20024e3098a81ce9f2dcc14d20ff07ac09c5a272 Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Thu, 16 May 2019 14:10:21 +0530 Subject: [PATCH 1/2] Logging in health endpoint --- src/app.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app.js b/src/app.js index 12826a1..ccdbbb3 100644 --- a/src/app.js +++ b/src/app.js @@ -76,7 +76,9 @@ function startKafkaConsumer(handlers, notificationServiceHandlers) { }); const check = function () { + logger.debug('Checking Health...') ; if (!consumer.client.initialBrokers && !consumer.client.initialBrokers.length) { + logger.debug('Found unhealthy Kafka Brokers...'); return false; } let connected = true; @@ -84,6 +86,7 @@ function startKafkaConsumer(handlers, notificationServiceHandlers) { logger.debug(`url ${conn.server()} - connected=${conn.connected}`); connected = conn.connected & connected; }); + logger.debug('Found all Kafka Brokers healthy...'); return connected; }; From 6321083362df1e40352c31354cd67ad8a33fbeda Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Thu, 16 May 2019 14:14:19 +0530 Subject: [PATCH 2/2] Temporary disabling the fix to reproduce the error on dev --- connect/connectNotificationServer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connect/connectNotificationServer.js b/connect/connectNotificationServer.js index 2bb28c2..00107ea 100644 --- a/connect/connectNotificationServer.js +++ b/connect/connectNotificationServer.js @@ -95,14 +95,14 @@ const getNotificationsForMentionedUser = (logger, eventConfig, content) => { notification.userId = mentionedUser ? mentionedUser.userId.toString() : notification.userHandle; }); resolve(notifications); - }).catch((error) => { + })/*.catch((error) => { if (logger) { logger.error(error); logger.info('Unable to send notification to mentioned user') } //resolves with empty notification which essentially means we are unable to send notification to mentioned user resolve([]); - }); + })*/; } else { resolve([]); }