feature/IO-3096-GlobalNotifications - Check-point

This commit is contained in:
Dave Richer
2025-02-11 10:40:57 -05:00
parent 54820fe3c8
commit 2ee582bfa2
9 changed files with 156 additions and 91 deletions

View File

@@ -0,0 +1,23 @@
const path = require("path");
require("dotenv").config({
path: path.resolve(process.cwd(), `.env.${process.env.NODE_ENV || "development"}`)
});
const Queue = require("better-queue");
const logger = require("../../utils/logger");
const notificationsEmailQueue = () =>
new Queue(
(taskIds, cb) => {
logger.log("Processing Notification Emails: ", "silly", null, null);
cb(null);
},
{
batchSize: 50,
batchDelay: 5000,
// The lower this is, the more likely we are to hit the rate limit.
batchDelayTimeout: 1000
}
);
module.exports = { notificationsEmailQueue };