apphealth: print healthcheck exceptions

This commit is contained in:
Girish Ramakrishnan
2025-08-06 08:26:08 +02:00
parent 2458b6b388
commit 618d2b993a
+3 -1
View File
@@ -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; });