feature/IO-3096-GlobalNotifications - Checkpoint/Refactor cleanup

This commit is contained in:
Dave Richer
2025-02-12 14:44:24 -05:00
parent 3f75041ad9
commit 19d608e2b0
31 changed files with 434 additions and 335 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 };