do not trust the health state blindly

This commit is contained in:
Girish Ramakrishnan
2015-11-12 16:16:05 -08:00
parent 6bd68961d1
commit 0cef3e1090

View File

@@ -110,7 +110,8 @@ function processApps(callback) {
async.each(apps, checkAppHealth, function (error) {
if (error) console.error(error);
var alive = apps.filter(function (a) { return a.health === appdb.HEALTH_HEALTHY; })
var alive =apps
.filter(function (a) { return a.installationState === appdb.ISTATE_INSTALLED && a.runState === appdb.RSTATE_RUNNING && a.health === appdb.HEALTH_HEALTHY; })
.map(function (a) { return a.location; }).join(', ');
debug('apps alive: [%s]', alive);