All files / src/modules/quick-rent/workers reminders.processor.ts

62.5% Statements 5/8
100% Branches 0/0
0% Functions 0/1
50% Lines 3/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1911x   11x           11x                    
import { Processor, WorkerHost } from '@nestjs/bullmq';
import { Job } from 'bullmq';
import { Injectable, Logger } from '@nestjs/common';
 
interface RemindPayload { requestId: number }
 
@Processor('quick-rent:reminders')
@Injectable()
export class QuickRentRemindersProcessor extends WorkerHost {
  private readonly logger = new Logger(QuickRentRemindersProcessor.name);
  async process(job: Job<RemindPayload>): Promise<void> {
    const { requestId } = job.data;
    // TODO: send reminders to bidders/owner via NotificationService
    this.logger.debug(`Reminder for quick-rent request ${requestId}`);
  }
}