* refactor(server): job repository * refactor: job repository * chore: generate open-api * fix: job panel * Remove incorrect subtitle Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
13 lines
430 B
TypeScript
13 lines
430 B
TypeScript
import { IJobRepository, JobName } from '@app/domain';
|
|
import { AssetEntity } from '@app/infra';
|
|
import { Inject, Injectable } from '@nestjs/common';
|
|
|
|
@Injectable()
|
|
export class BackgroundTaskService {
|
|
constructor(@Inject(IJobRepository) private jobRepository: IJobRepository) {}
|
|
|
|
async deleteFileOnDisk(assets: AssetEntity[]) {
|
|
await this.jobRepository.add({ name: JobName.DELETE_FILE_ON_DISK, data: { assets } });
|
|
}
|
|
}
|