enhance(backend): migrate bull to bullmq (#10910)

* wip

* wip

* Update QueueService.ts

* wip

* refactor

* ✌️

* fix

* Update QueueStatsService.ts

* refactor

* Update ApNoteService.ts

* Update mock-resolver.ts

* refactor

* Update mock-resolver.ts
This commit is contained in:
syuilo 2023-05-29 11:54:49 +09:00 committed by GitHub
parent 7cbd852fe5
commit fd7b77c542
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
53 changed files with 532 additions and 490 deletions

View file

@ -12,7 +12,7 @@ import { DriveService } from '@/core/DriveService.js';
import { DownloadService } from '@/core/DownloadService.js';
import { bindThis } from '@/decorators.js';
import { QueueLoggerService } from '../QueueLoggerService.js';
import type Bull from 'bull';
import type * as Bull from 'bullmq';
import type { DbUserImportJobData } from '../types.js';
// TODO: 名前衝突時の動作を選べるようにする
@ -45,14 +45,13 @@ export class ImportCustomEmojisProcessorService {
}
@bindThis
public async process(job: Bull.Job<DbUserImportJobData>, done: () => void): Promise<void> {
public async process(job: Bull.Job<DbUserImportJobData>): Promise<void> {
this.logger.info('Importing custom emojis ...');
const file = await this.driveFilesRepository.findOneBy({
id: job.data.fileId,
});
if (file == null) {
done();
return;
}
@ -116,7 +115,6 @@ export class ImportCustomEmojisProcessorService {
cleanup();
this.logger.succ('Imported');
done();
});
unzipStream.pipe(extractor);
this.logger.succ(`Unzipping to ${outputPath}`);