mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
22 lines
612 B
TypeScript
22 lines
612 B
TypeScript
|
|
import { BullModule } from '@nestjs/bull';
|
||
|
|
import { Module } from '@nestjs/common';
|
||
|
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
||
|
|
import { AssetEntity } from '../../api-v1/asset/entities/asset.entity';
|
||
|
|
import { BackgroundTaskService } from './background-task.service';
|
||
|
|
|
||
|
|
@Module({
|
||
|
|
imports: [
|
||
|
|
BullModule.registerQueue({
|
||
|
|
name: 'background-task',
|
||
|
|
defaultJobOptions: {
|
||
|
|
attempts: 3,
|
||
|
|
removeOnComplete: true,
|
||
|
|
removeOnFail: false,
|
||
|
|
},
|
||
|
|
}),
|
||
|
|
TypeOrmModule.forFeature([AssetEntity]),
|
||
|
|
],
|
||
|
|
providers: [BackgroundTaskService],
|
||
|
|
})
|
||
|
|
export class BackgroundTaskModule {}
|