feat: message cleaner drop repository (#6052)

This PR use the new `TwentyORM` for the message-cleaner module by using
the new injection system with `@InjectWorkspaceRepository`.
This commit is contained in:
Jérémy M
2024-06-30 21:57:18 +02:00
committed by GitHub
parent be1503c719
commit 13f213a05e
4 changed files with 72 additions and 23 deletions

View File

@ -1,4 +1,4 @@
import { Logger } from '@nestjs/common';
import { Logger, Scope } from '@nestjs/common';
import { Process } from 'src/engine/integrations/message-queue/decorators/process.decorator';
import { Processor } from 'src/engine/integrations/message-queue/decorators/processor.decorator';
@ -17,7 +17,10 @@ export type BlocklistItemDeleteMessagesJobData = {
blocklistItemId: string;
};
@Processor(MessageQueue.messagingQueue)
@Processor({
queueName: MessageQueue.messagingQueue,
scope: Scope.REQUEST,
})
export class BlocklistItemDeleteMessagesJob {
private readonly logger = new Logger(BlocklistItemDeleteMessagesJob.name);