apphealth: print healthcheck exceptions
This commit is contained in:
@@ -168,7 +168,9 @@ async function processApp(options) {
|
||||
|
||||
const healthChecks = allApps.map((app) => checkAppHealth(app, options)); // start healthcheck in parallel
|
||||
|
||||
await Promise.allSettled(healthChecks); // wait for all promises to finish
|
||||
const results = await Promise.allSettled(healthChecks); // wait for all promises to finish
|
||||
const unfulfilled = results.filter(r => r.status === 'rejected');
|
||||
if (unfulfilled.length) debug(`app health: ${unfulfilled.length} health checks exceptions. e.g. ${unfulfilled[0].reason}`); // this should not happen
|
||||
|
||||
const stopped = allApps.filter(app => app.runState === apps.RSTATE_STOPPED);
|
||||
const running = allApps.filter(function (a) { return a.installationState === apps.ISTATE_INSTALLED && a.runState === apps.RSTATE_RUNNING && a.health === apps.HEALTH_HEALTHY; });
|
||||
|
||||
Reference in New Issue
Block a user