From 57deef320e5892be1b4214eb3805e40a439c83c0 Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Wed, 27 Nov 2024 22:10:50 -0500 Subject: [PATCH] restore functionality of `MK_NO_DAEMONS` option --- packages/backend/src/boot/common.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/backend/src/boot/common.ts b/packages/backend/src/boot/common.ts index 268c07582d..ad59a55688 100644 --- a/packages/backend/src/boot/common.ts +++ b/packages/backend/src/boot/common.ts @@ -12,6 +12,7 @@ import { QueueStatsService } from '@/daemons/QueueStatsService.js'; import { ServerStatsService } from '@/daemons/ServerStatsService.js'; import { ServerService } from '@/server/ServerService.js'; import { MainModule } from '@/MainModule.js'; +import { envOption } from '@/env.js'; export async function server() { const app = await NestFactory.createApplicationContext(MainModule, { @@ -23,6 +24,8 @@ export async function server() { if (process.env.NODE_ENV !== 'test') { app.get(ChartManagementService).start(); + } + if (!envOption.noDaemons) { app.get(QueueStatsService).start(); app.get(ServerStatsService).start(); }