mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
* Added file selector * Extract metadata to upload files to the web * Added request for uploading * Generate jpeg/Webp thumbnail for asset uploaded without thumbnail data * Added generating thumbnail for video and WebSocket broadcast after thumbnail is generated * Added video length extraction * Added Uploading Panel * Added upload progress store and styling the uploaded asset * Added condition to only show upload panel when there is upload in progress * Remove asset from the upload list after successfully uploading * Added WebSocket to listen to upload event on the web * Added mechanism to check for existing assets before uploading on the web * Added test workflow * Update readme
75 lines
2.4 KiB
TypeScript
75 lines
2.4 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 { AssetModule } from '../../immich/src/api-v1/asset/asset.module';
|
|
import { CommunicationGateway } from '../../immich/src/api-v1/communication/communication.gateway';
|
|
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 {}
|