chore: add queue for invoice reminder logic but not tested

This commit is contained in:
mahyargdz
2025-03-07 19:03:45 +03:30
parent a4cae0c273
commit 15187680ce
7 changed files with 212 additions and 7 deletions
+15
View File
@@ -0,0 +1,15 @@
export const INVOICE = Object.freeze({
INVOICE_QUEUE_NAME: "invoice",
INVOICE_REMINDER_JOB_NAME: "reminderInvoice",
//
INVOICE_REMINDER_JOB_PRIORITY: 1, // High priority
INVOICE_REMINDER_JOB_ATTEMPTS: 3, // Retry 3 times
INVOICE_REMINDER_JOB_BACKOFF: 1000, // Retry after 1 second
INVOICE_REMINDER_JOB_TIMEOUT: 10000, // Timeout after 10 seconds
INVOICE_REMINDER_REPEAT_DELAY: 86400000, // 1 day delay in milliseconds
//
FINE_PERCENTAGE: 0.01, // 1% of the total price
MAX_DAYS_AFTER_OVERDUE: 10,
DUEDATE: 7,
DAYS_BEFORE_OVERDUE: 3,
});