merge: Fix MK_NO_DAEMONS flag (!786)

View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/786

Approved-by: Marie <github@yuugi.dev>
Approved-by: dakkar <dakkar@thenautilus.net>
This commit is contained in:
dakkar 2024-12-06 16:00:33 +00:00
commit a62bdb6593

View file

@ -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();
}