mail-time 1.3.3 → 1.3.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/index.js +3 -3
- package/package.json +5 -5
package/index.js
CHANGED
|
@@ -162,13 +162,13 @@ module.exports = class MailTime {
|
|
|
162
162
|
throw new Error('[mail-time] transports is required and must be an Array, like returned from `nodemailer.createTransport`');
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
this.collection = opts.db.collection(
|
|
166
|
-
this.collection.createIndex({
|
|
165
|
+
this.collection = opts.db.collection(`__mailTimeQueue__${this.prefix}`);
|
|
166
|
+
this.collection.createIndex({ isSent: 1, to: 1, sendAt: 1 }, (indexError) => {
|
|
167
167
|
if (indexError) {
|
|
168
168
|
_logError('[createIndex]', indexError);
|
|
169
169
|
}
|
|
170
170
|
});
|
|
171
|
-
this.collection.createIndex({
|
|
171
|
+
this.collection.createIndex({ isSent: 1, sendAt: 1, tries: 1 }, { background: true }, (indexError) => {
|
|
172
172
|
if (indexError) {
|
|
173
173
|
_logError('[createIndex]', indexError);
|
|
174
174
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mail-time",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"description": "Bulletproof email queue on top of NodeMailer for a single and multi-server setups",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"josk": "^3.0.2"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"bson": "^4.
|
|
56
|
-
"bson-ext": "^4.0.
|
|
55
|
+
"bson": "^4.7.0",
|
|
56
|
+
"bson-ext": "^4.0.3",
|
|
57
57
|
"chai": "^4.3.6",
|
|
58
58
|
"mocha": "^10.0.0",
|
|
59
|
-
"mongodb": "^4.
|
|
60
|
-
"nodemailer": "^6.7.
|
|
59
|
+
"mongodb": "^4.10.0",
|
|
60
|
+
"nodemailer": "^6.7.8",
|
|
61
61
|
"nodemailer-direct-transport": "^3.0.7"
|
|
62
62
|
}
|
|
63
63
|
}
|