mirror of
https://github.com/immich-app/immich
synced 2026-08-22 13:13:05 +00:00
Added background tasks queue
This commit is contained in:
parent
c5bf535209
commit
03b67a98d3
6 changed files with 73 additions and 665 deletions
21
server/src/modules/background-task/background-task.module.ts
Normal file
21
server/src/modules/background-task/background-task.module.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
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 {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue