From 8694b77f34242445430d84ebe1badc6baa93c704 Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Wed, 23 Oct 2024 14:55:15 +0100 Subject: [PATCH 1/2] fix: change default `minRunningApps` to 1 --- shared/packages/api/src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/packages/api/src/config.ts b/shared/packages/api/src/config.ts index f686711d..cbb6e8e1 100644 --- a/shared/packages/api/src/config.ts +++ b/shared/packages/api/src/config.ts @@ -205,7 +205,7 @@ const appContainerArguments = defineArguments({ }, minRunningApps: { type: 'number', - default: parseInt(process.env.APP_CONTAINER_MIN_RUNNING_APPS || '', 10) || 0, + default: parseInt(process.env.APP_CONTAINER_MIN_RUNNING_APPS || '', 10) || 1, describe: 'Minimum amount of apps (of a certain appType) to be running', }, maxAppKeepalive: { From b567535927cbd2cfed32773ffaa39cb631d7ad41 Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Thu, 24 Oct 2024 11:29:32 +0100 Subject: [PATCH 2/2] fix: update default config and change severity of warning --- shared/packages/api/src/config.ts | 2 +- shared/packages/workforce/src/workforce.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/shared/packages/api/src/config.ts b/shared/packages/api/src/config.ts index cbb6e8e1..4753b954 100644 --- a/shared/packages/api/src/config.ts +++ b/shared/packages/api/src/config.ts @@ -220,7 +220,7 @@ const appContainerArguments = defineArguments({ }, minCriticalWorkerApps: { type: 'number', - default: 0, + default: 1, describe: 'Number of Workers reserved for fulfilling playout-critical expectations that will be kept running', }, diff --git a/shared/packages/workforce/src/workforce.ts b/shared/packages/workforce/src/workforce.ts index eee0d644..b17cd325 100644 --- a/shared/packages/workforce/src/workforce.ts +++ b/shared/packages/workforce/src/workforce.ts @@ -218,7 +218,8 @@ export class Workforce { statuses['any-workers'] = this.workerAgents.size === 0 ? { - statusCode: StatusCode.BAD, + // This is perfectly normal in some scenarios, so we don't report this as an error + statusCode: StatusCode.GOOD, message: 'No workers connected to workforce', } : {