From e9e7eb38514bda00673c66632271f98464c305fd Mon Sep 17 00:00:00 2001 From: Rafael Tapia Date: Wed, 10 Jan 2024 10:11:27 -0300 Subject: [PATCH] fix: async --- apps/meteor/app/statistics/server/lib/getAppsStatistics.js | 4 +--- apps/meteor/ee/server/apps/orchestrator.js | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/meteor/app/statistics/server/lib/getAppsStatistics.js b/apps/meteor/app/statistics/server/lib/getAppsStatistics.js index 0edbb4645079..337ee622dc6d 100644 --- a/apps/meteor/app/statistics/server/lib/getAppsStatistics.js +++ b/apps/meteor/app/statistics/server/lib/getAppsStatistics.js @@ -10,8 +10,6 @@ export async function getAppsStatistics() { totalActive: Apps.isInitialized() && (await Apps.getManager().get({ enabled: true })).length, totalFailed: Apps.isInitialized() && - Apps.getManager() - .get({ disabled: true }) - .filter(({ app: { status } }) => status !== AppStatus.MANUALLY_DISABLED).length, + (await Apps.getManager().get({ disabled: true })).filter(({ app: { status } }) => status !== AppStatus.MANUALLY_DISABLED).length, }; } diff --git a/apps/meteor/ee/server/apps/orchestrator.js b/apps/meteor/ee/server/apps/orchestrator.js index 50a87d489b1a..0c128867efd9 100644 --- a/apps/meteor/ee/server/apps/orchestrator.js +++ b/apps/meteor/ee/server/apps/orchestrator.js @@ -172,8 +172,7 @@ export class AppServerOrchestrator { await this.getManager().load(); // Before enabling each app we verify if there is still room for it - await this.getManager() - .get() + (await this.getManager().get()) // We reduce everything to a promise chain so it runs sequentially .reduce( (control, app) =>