mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor(server): cls (#13814)
This commit is contained in:
parent
2efba6326d
commit
19eb3ed8b9
5 changed files with 31 additions and 21 deletions
|
|
@ -7,7 +7,7 @@ import { TypeOrmModule } from '@nestjs/typeorm';
|
|||
import { ClsModule } from 'nestjs-cls';
|
||||
import { OpenTelemetryModule } from 'nestjs-otel';
|
||||
import { commands } from 'src/commands';
|
||||
import { clsConfig, immichAppConfig } from 'src/config';
|
||||
import { immichAppConfig } from 'src/config';
|
||||
import { controllers } from 'src/controllers';
|
||||
import { entities } from 'src/entities';
|
||||
import { ImmichWorker } from 'src/enum';
|
||||
|
|
@ -37,12 +37,12 @@ const middleware = [
|
|||
];
|
||||
|
||||
const configRepository = new ConfigRepository();
|
||||
const { bull, database, otel } = configRepository.getEnv();
|
||||
const { bull, cls, database, otel } = configRepository.getEnv();
|
||||
|
||||
const imports = [
|
||||
BullModule.forRoot(bull.config),
|
||||
BullModule.registerQueue(...bull.queues),
|
||||
ClsModule.forRoot(clsConfig),
|
||||
ClsModule.forRoot(cls.config),
|
||||
ConfigModule.forRoot(immichAppConfig),
|
||||
OpenTelemetryModule.forRoot(otel),
|
||||
TypeOrmModule.forRootAsync({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue