fix: bug in the send reminder send
This commit is contained in:
@@ -96,10 +96,10 @@ export class InvoicesService {
|
||||
INVOICE.INVOICE_REMINDER_JOB_NAME,
|
||||
{ invoiceId: invoice.id },
|
||||
{
|
||||
delay: dayjs(invoice.dueDate).subtract(3, "day").diff(dayjs()),
|
||||
// delay: dayjs(invoice.dueDate).subtract(INVOICE.DAYS_BEFORE_OVERDUE, "day").diff(dayjs()),
|
||||
delay: 900000, // 15 minutes in milliseconds
|
||||
attempts: INVOICE.INVOICE_REMINDER_JOB_ATTEMPTS,
|
||||
backoff: INVOICE.INVOICE_REMINDER_JOB_BACKOFF,
|
||||
repeat: { every: 300000 }, // Repeat every 5 minutes (300,000 ms)
|
||||
},
|
||||
);
|
||||
|
||||
@@ -198,6 +198,8 @@ export class InvoicesService {
|
||||
queryRunner,
|
||||
);
|
||||
|
||||
await this.otpService.delOtpFormCache(user.phone, "INVOICE_VERIFY");
|
||||
|
||||
await queryRunner.commitTransaction();
|
||||
|
||||
return {
|
||||
@@ -255,7 +257,8 @@ export class InvoicesService {
|
||||
INVOICE.INVOICE_REMINDER_JOB_NAME,
|
||||
{ invoiceId: invoice.id },
|
||||
{
|
||||
delay: dayjs(invoice.dueDate).subtract(INVOICE.DAYS_BEFORE_OVERDUE, "day").diff(dayjs()),
|
||||
// delay: dayjs(invoice.dueDate).subtract(INVOICE.DAYS_BEFORE_OVERDUE, "day").diff(dayjs()),
|
||||
delay: 900000, // 15 minutes in milliseconds
|
||||
attempts: INVOICE.INVOICE_REMINDER_JOB_ATTEMPTS,
|
||||
backoff: INVOICE.INVOICE_REMINDER_JOB_BACKOFF,
|
||||
repeat: { every: 300000 },
|
||||
|
||||
Reference in New Issue
Block a user