From 9471dc27e0b4e87fc86615ff3488f5c03bb13996 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 12 Feb 2019 17:01:45 -0800 Subject: [PATCH] App can also be dead/error --- src/apphealthmonitor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apphealthmonitor.js b/src/apphealthmonitor.js index 50e0f4b30..583a03961 100644 --- a/src/apphealthmonitor.js +++ b/src/apphealthmonitor.js @@ -38,8 +38,8 @@ function setHealth(app, health, callback) { if (health === appdb.HEALTH_HEALTHY) { healthTime = now; - if (curHealth === appdb.HEALTH_UNHEALTHY) { - debugApp(app, 'app switched from unhealthy to healthy'); + if (curHealth !== appdb.HEALTH_HEALTHY) { + debugApp(app, 'app switched from %s to healthy', curHealth); // do not send mails for dev apps if (!app.debugMode) eventlog.add(eventlog.ACTION_APP_UP, AUDIT_SOURCE, { app: app });