feat: send invoices and reminder notifications to the customers

This commit is contained in:
Ahmed Bouhuolia
2023-12-21 22:57:17 +02:00
parent ef52eaf91a
commit d2c63878ed
10 changed files with 227 additions and 45 deletions

View File

@@ -10,7 +10,7 @@ export class SendSaleInvoiceMailJob {
constructor(agenda) {
agenda.define(
'sale-invoice-mail-send',
{ priority: 'high', concurrency: 1 },
{ priority: 'high', concurrency: 2 },
this.handler
);
}
@@ -23,7 +23,7 @@ export class SendSaleInvoiceMailJob {
const sendInvoiceMail = Container.get(SendSaleInvoiceMail);
try {
await sendInvoiceMail.triggerMail(tenantId, saleInvoiceId, messageDTO);
await sendInvoiceMail.sendMail(tenantId, saleInvoiceId, messageDTO);
done();
} catch (error) {
console.log(error);