This commit is contained in:
Mahyargdz
2025-05-13 09:45:15 +03:30
parent f18295b628
commit 1efc3a2795
23 changed files with 1277 additions and 14 deletions
+31
View File
@@ -0,0 +1,31 @@
export const INVOICE = Object.freeze({
QUEUE_NAME: "invoice",
REMINDER_JOB_NAME: "reminderInvoice",
RECURRING_JOB_NAME: "recurringInvoice",
SUBSCRIPTION_ADMIN_NOTIFICATION_JOB_NAME: "subscriptionAdminNotification",
//
REMINDER_JOB_PRIORITY: 1, // high priority
REMINDER_JOB_ATTEMPTS: 3, // 3 times
REMINDER_JOB_BACKOFF: 5 * 1000, // ms
REMINDER_JOB_TIMEOUT: 10000, // timeout after 10 seconds
REMINDER_REPEAT_DELAY: 1 * 24 * 60 * 60 * 1000, // 1 day delay in milliseconds
//
RECURRING_JOB_PRIORITY: 1, // high priority
RECURRING_JOB_ATTEMPTS: 3, // retry 3 times
RECURRING_JOB_BACKOFF: 5 * 1000, // retry after 5 second
RECURRING_JOB_TIMEOUT: 10000, // timeout after 10 seconds
//
SUBSCRIPTION_ADMIN_NOTIFICATION_JOB_DELAY: 1000, // delay after 1 second
SUBSCRIPTION_ADMIN_NOTIFICATION_JOB_PRIORITY: 1, // high priority
SUBSCRIPTION_ADMIN_NOTIFICATION_JOB_ATTEMPTS: 3, // retry 3 times
SUBSCRIPTION_ADMIN_NOTIFICATION_JOB_BACKOFF: 5 * 1000, // retry after 5 second
SUBSCRIPTION_ADMIN_NOTIFICATION_JOB_TIMEOUT: 10000, // timeout after 10 seconds
//
FINE_PERCENTAGE: 0.01, // 1% of the total price
MAX_DAYS_AFTER_OVERDUE: 10,
DUEDATE: 7,
DAYS_BEFORE_OVERDUE: 3,
});