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

@ -6,7 +6,7 @@ import type Logger from '@/logger.js';
import { NotificationService } from '@/core/NotificationService.js';
import { bindThis } from '@/decorators.js';
import { QueueLoggerService } from '../QueueLoggerService.js';
import type * as Bull from 'bullmq';
import type Bull from 'bull';
import type { EndedPollNotificationJobData } from '../types.js';
@Injectable()
@ -30,9 +30,10 @@ export class EndedPollNotificationProcessorService {
}
@bindThis
public async process(job: Bull.Job<EndedPollNotificationJobData>): Promise<void> {
public async process(job: Bull.Job<EndedPollNotificationJobData>, done: () => void): Promise<void> {
const note = await this.notesRepository.findOneBy({ id: job.data.noteId });
if (note == null || !note.hasPoll) {
done();
return;
}
@ -50,5 +51,7 @@ export class EndedPollNotificationProcessorService {
noteId: note.id,
});
}
done();
}
}