Cleanup default values and leftover methods in environmentService (#4550)

* Cleanup default values and leftover methods in environmentService

* Adress remainings configService calls
This commit is contained in:
Félix Malfait
2024-03-18 17:09:39 +01:00
committed by GitHub
parent 1cc8bdd3e9
commit bdbd77c696
15 changed files with 110 additions and 172 deletions

View File

@ -1,4 +1,5 @@
import { NestFactory } from '@nestjs/core';
import { ConfigService } from '@nestjs/config';
import {
MessageQueueJob,
@ -13,14 +14,17 @@ import { MessageQueue } from 'src/engine/integrations/message-queue/message-queu
import { MessageQueueService } from 'src/engine/integrations/message-queue/services/message-queue.service';
import { getJobClassName } from 'src/engine/integrations/message-queue/utils/get-job-class-name.util';
import { QueueWorkerModule } from 'src/queue-worker/queue-worker.module';
import { EnvironmentService } from 'src/engine/integrations/environment/environment.service';
async function bootstrap() {
let exceptionHandlerService: ExceptionHandlerService | undefined;
let loggerService: LoggerService | undefined;
try {
const environmentService = new EnvironmentService(new ConfigService());
const app = await NestFactory.createApplicationContext(QueueWorkerModule, {
bufferLogs: process.env.LOGGER_IS_BUFFER_ENABLED === 'true',
bufferLogs: environmentService.get('LOGGER_IS_BUFFER_ENABLED'),
});
loggerService = app.get(LoggerService);