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

This reverts commit fd7b77c542.
This commit is contained in:
riku6460 2023-06-15 02:57:13 +09:00
parent cc87ef9e76
commit 9b3a92e999
No known key found for this signature in database
GPG key ID: 27414FA27DB94CF6
42 changed files with 509 additions and 542 deletions

View file

@ -8,7 +8,7 @@ import { DI } from '@/di-symbols.js';
import { bindThis } from '@/decorators.js';
import { QueueLoggerService } from '../QueueLoggerService.js';
import { DBAntennaImportJobData } from '../types.js';
import type * as Bull from 'bullmq';
import type Bull from 'bull';
const validate = new Ajv().compile({
type: 'object',
@ -59,7 +59,7 @@ export class ImportAntennasProcessorService {
}
@bindThis
public async process(job: Bull.Job<DBAntennaImportJobData>): Promise<void> {
public async process(job: Bull.Job<DBAntennaImportJobData>, done: () => void): Promise<void> {
const now = new Date();
try {
for (const antenna of job.data.antenna) {
@ -89,6 +89,8 @@ export class ImportAntennasProcessorService {
}
} catch (err: any) {
this.logger.error(err);
} finally {
done();
}
}
}