@astralibx/email-account-manager 10.6.2 → 10.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +14 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +14 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1455,6 +1455,19 @@ var QueueService = class {
|
|
|
1455
1455
|
const globalSettings = await this.settings.get();
|
|
1456
1456
|
const queueSettings = globalSettings.queues;
|
|
1457
1457
|
const connectionOpts = getRedisOptions(this.redis);
|
|
1458
|
+
try {
|
|
1459
|
+
const info = await this.redis.config("GET", "maxmemory-policy");
|
|
1460
|
+
const policy = Array.isArray(info) ? info[1] : void 0;
|
|
1461
|
+
if (policy && policy !== "noeviction") {
|
|
1462
|
+
this.logger.warn(`Redis maxmemory-policy is "${policy}". BullMQ requires "noeviction" to prevent job loss. Run: redis-cli CONFIG SET maxmemory-policy noeviction`);
|
|
1463
|
+
}
|
|
1464
|
+
} catch {
|
|
1465
|
+
}
|
|
1466
|
+
const origWarn = console.warn;
|
|
1467
|
+
console.warn = (...args) => {
|
|
1468
|
+
if (typeof args[0] === "string" && args[0].includes("Eviction policy")) return;
|
|
1469
|
+
origWarn.apply(console, args);
|
|
1470
|
+
};
|
|
1458
1471
|
this.sendQueue = new bullmq.Queue(sendQueueName, {
|
|
1459
1472
|
connection: connectionOpts,
|
|
1460
1473
|
prefix: keyPrefix
|
|
@@ -1481,6 +1494,7 @@ var QueueService = class {
|
|
|
1481
1494
|
concurrency: queueSettings.approvalConcurrency
|
|
1482
1495
|
}
|
|
1483
1496
|
);
|
|
1497
|
+
console.warn = origWarn;
|
|
1484
1498
|
this.sendWorker.on("failed", (job, err) => {
|
|
1485
1499
|
this.logger.error("Send job failed", {
|
|
1486
1500
|
jobId: job?.id,
|