Revert "Synchronize server startup"

This reverts commit ffbdfa9123.
This commit is contained in:
Hazelnoot 2024-12-19 11:22:54 -05:00
parent d14f0b140b
commit 465c780a04
3 changed files with 13 additions and 14 deletions

View file

@ -19,18 +19,17 @@ export async function server() {
logger: new NestLogger(),
});
if (process.env.NODE_ENV !== 'test') {
await app.get(ChartManagementService).start();
}
if (!envOption.noDaemons) {
await app.get(QueueStatsService).start();
await app.get(ServerStatsService).start();
}
// Start server last so the other services can register hooks first
const serverService = app.get(ServerService);
await serverService.launch();
if (process.env.NODE_ENV !== 'test') {
app.get(ChartManagementService).start();
}
if (!envOption.noDaemons) {
app.get(QueueStatsService).start();
app.get(ServerStatsService).start();
}
return app;
}
@ -39,8 +38,8 @@ export async function jobQueue() {
logger: new NestLogger(),
});
await jobQueue.get(QueueProcessorService).start();
await jobQueue.get(ChartManagementService).start();
jobQueue.get(QueueProcessorService).start();
jobQueue.get(ChartManagementService).start();
return jobQueue;
}