なんかもうめっちゃ変えた
This commit is contained in:
parent
d9ab03f086
commit
b75184ec8e
946 changed files with 41219 additions and 28839 deletions
|
@ -0,0 +1,31 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { Config } from '@/config.js';
|
||||
import type Logger from '@/logger.js';
|
||||
import { DriveService } from '@/core/DriveService.js';
|
||||
import { QueueLoggerService } from '../QueueLoggerService.js';
|
||||
import type Bull from 'bull';
|
||||
import type { ObjectStorageFileJobData } from '../types.js';
|
||||
|
||||
@Injectable()
|
||||
export class DeleteFileProcessorService {
|
||||
#logger: Logger;
|
||||
|
||||
constructor(
|
||||
@Inject(DI.config)
|
||||
private config: Config,
|
||||
|
||||
private driveService: DriveService,
|
||||
private queueLoggerService: QueueLoggerService,
|
||||
) {
|
||||
this.#logger = this.queueLoggerService.logger.createSubLogger('delete-file');
|
||||
}
|
||||
|
||||
public async process(job: Bull.Job<ObjectStorageFileJobData>): Promise<string> {
|
||||
const key: string = job.data.key;
|
||||
|
||||
await this.driveService.deleteObjectStorageFile(key);
|
||||
|
||||
return 'Success';
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue