mirror of
https://github.com/immich-app/immich.git
synced 2025-12-03 03:35:20 -05:00
* Fix lint issues and some other TS issues - set TypeScript in strict mode - add npm commands to lint / check code - fix all lint issues - fix some TS issues - rename User reponse DTO to make it consistent with the other ones - override Express/User interface to use UserResponseDto interface This is for when the accessing the `user` from a Express Request, like in `asset-upload-config` * Fix the rest of TS issues - fix all the remaining TypeScript errors - add missing `@types/mapbox__mapbox-sdk` package * Move global.d.ts to server `src` folder * Update AssetReponseDto duration type This is now of type `string` that defaults to '0:00:00.00000' if not set which is what the mobile app currently expects * Set context when logging error in asset.service Use `ServeFile` as the context for logging an error when asset.resizePath is not set * Fix wrong AppController merge conflict resolution `redirectToWebpage` was removed in main as is no longer used.
73 lines
2.3 KiB
TypeScript
73 lines
2.3 KiB
TypeScript
import { BullModule } from '@nestjs/bull';
|
|
import { Module } from '@nestjs/common';
|
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
|
import { DatabaseModule } from '@app/database';
|
|
import { AssetEntity } from '@app/database/entities/asset.entity';
|
|
import { ExifEntity } from '@app/database/entities/exif.entity';
|
|
import { SmartInfoEntity } from '@app/database/entities/smart-info.entity';
|
|
import { UserEntity } from '@app/database/entities/user.entity';
|
|
import { MicroservicesService } from './microservices.service';
|
|
import { AssetUploadedProcessor } from './processors/asset-uploaded.processor';
|
|
import { ThumbnailGeneratorProcessor } from './processors/thumbnail.processor';
|
|
import { MetadataExtractionProcessor } from './processors/metadata-extraction.processor';
|
|
import { VideoTranscodeProcessor } from './processors/video-transcode.processor';
|
|
import { CommunicationModule } from '../../immich/src/api-v1/communication/communication.module';
|
|
|
|
@Module({
|
|
imports: [
|
|
DatabaseModule,
|
|
TypeOrmModule.forFeature([UserEntity, ExifEntity, AssetEntity, SmartInfoEntity]),
|
|
BullModule.forRootAsync({
|
|
useFactory: async () => ({
|
|
redis: {
|
|
host: process.env.REDIS_HOSTNAME || 'immich_redis',
|
|
port: 6379,
|
|
},
|
|
}),
|
|
}),
|
|
BullModule.registerQueue({
|
|
name: 'thumbnail-generator-queue',
|
|
defaultJobOptions: {
|
|
attempts: 3,
|
|
removeOnComplete: true,
|
|
removeOnFail: false,
|
|
},
|
|
}),
|
|
BullModule.registerQueue({
|
|
name: 'asset-uploaded-queue',
|
|
defaultJobOptions: {
|
|
attempts: 3,
|
|
removeOnComplete: true,
|
|
removeOnFail: false,
|
|
},
|
|
}),
|
|
BullModule.registerQueue({
|
|
name: 'metadata-extraction-queue',
|
|
defaultJobOptions: {
|
|
attempts: 3,
|
|
removeOnComplete: true,
|
|
removeOnFail: false,
|
|
},
|
|
}),
|
|
BullModule.registerQueue({
|
|
name: 'video-conversion-queue',
|
|
defaultJobOptions: {
|
|
attempts: 3,
|
|
removeOnComplete: true,
|
|
removeOnFail: false,
|
|
},
|
|
}),
|
|
CommunicationModule,
|
|
],
|
|
controllers: [],
|
|
providers: [
|
|
MicroservicesService,
|
|
AssetUploadedProcessor,
|
|
ThumbnailGeneratorProcessor,
|
|
MetadataExtractionProcessor,
|
|
VideoTranscodeProcessor,
|
|
],
|
|
exports: [],
|
|
})
|
|
export class MicroservicesModule {}
|