Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nodemailer-sequelize-queue

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodemailer-sequelize-queue - npm Package Compare versions

Comparing version 0.0.14 to 0.0.15

20

dist/Scheduler.js

@@ -46,3 +46,12 @@ "use strict";

const mails = await this.queueModel.findAll(options);
// Remove from queue(prevents duplicate sends with multiple workers)
await this.queueModel.destroy({
where: {
id: {
[sequelize_1.Op.in]: mails.map((m) => m.id),
},
},
});
this.log(`Sending queued mail, number: ${mails?.length}`);
console.log('mails', mails.length);
for (const mail of mails) {

@@ -64,5 +73,10 @@ this.sendQueuedMail(mail);

logger_1.default.error(`Error sending mail to ${model.email_to}`, model);
model.update({
this.queueModel.create({
email_from: model.email_from,
email_to: model.email_to,
subject: model.subject,
html: model.html,
attachments: model.attachments,
attempts: model.attempts + 1,
last_error: JSON.stringify(e),
attempts: model.attempts++,
});

@@ -91,2 +105,2 @@ }

exports.default = Scheduler;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2NoZWR1bGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL1NjaGVkdWxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLDBEQUE0QjtBQUM1Qix5Q0FBOEI7QUFDOUIsc0RBQW1EO0FBRW5ELDREQUFtQztBQUVuQyxNQUFNLFNBQVM7SUFRYixZQUNFLGVBQW9CLEVBQ3BCLFVBQTZCLEVBQzdCLFVBQVUsR0FBRyxhQUFhLEVBQzFCLFVBQVUsR0FBRyxDQUFDLENBQUMsRUFDZixPQUFPLEdBQUcsS0FBSztRQUVmLElBQUksQ0FBQyxXQUFXLENBQUMsVUFBVSxDQUFDLEVBQUU7WUFDNUIsTUFBTSxJQUFJLEtBQUssQ0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AgIGlmICh0aGlzLmxvZ2dpbmcpIHtcbiAgICAgIGxvZ2dlci5sb2cobGV2ZWwsIG1lc3NhZ2UpXG4gICAgfVxuICB9XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgSVNjaGVkdWxlciB7XG4gIGV4cHJlc3Npb246IHN0cmluZ1xuICBtYXhBdHRlbXBzOiBudW1iZXJcbiAgbWFpbGVyOiBJTWFpbGVyXG4gIGxvZ2dpbmc6IGJvb2xlYW5cbn1cblxuZnVuY3Rpb24gaXNDcm9uVmFsaWQoZnJlcTogc3RyaW5nKTogYm9vbGVhbiB7XG4gIGNvbnN0IGNyb25yZWdleCA9IG5ldyBSZWdFeHAoXG4gICAgL14oXFwqfChbMC05XXwxWzAtOV18MlswLTldfDNbMC05XXw0WzAtOV18NVswLTldKXxcXCpcXC8oWzAtOV18MVswLTldfDJbMC05XXwzWzAtOV18NFswLTldfDVbMC05XSkpIChcXCp8KFswLTldfDFbMC05XXwyWzAtM10pfFxcKlxcLyhbMC05XXwxWzAtOV18MlswLTNdKSkgKFxcKnwoWzEtOV18MVswLTldfDJbMC05XXwzWzAtMV0pfFxcKlxcLyhbMS05XXwxWzAtOV18MlswLTldfDNbMC0xXSkpIChcXCp8KFsxLTldfDFbMC0yXSl8XFwqXFwvKFsxLTldfDFbMC0yXSkpIChcXCp8KFswLTZdKXxcXCpcXC8oWzAtNl0pKSQvXG4gIClcbiAgcmV0dXJuIGNyb25yZWdleC50ZXN0KGZyZXEpXG59XG5cbmV4cG9ydCBkZWZhdWx0IFNjaGVkdWxlclxuIl19

2

package.json
{
"name": "nodemailer-sequelize-queue",
"version": "0.0.14",
"version": "0.0.15",
"description": "Queue for mails with nodemailer and cron scheduler",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc