Skip to content

Commit

Permalink
📦 v1.2.6
Browse files Browse the repository at this point in the history
- ☄️ NPM: v1.2.6
- 📦 Meteor: v2.3.6

This is maintenance update

__Notable Changes__:

- Default `{ writeConcern }` options removed from write/update operations, pass `readConcern`, `writeConcern`, and `readPreference` as mongodb connections settings.

__Changes:__

- 👷 Fix possible memory leak with forcefully closing cursors `Cursor#close()`;
- 🤝 Compatibility with `[email protected]` (*the driver*);
- 🤝 Compatibility with `[email protected]`;
- 📦 `josk` upgaded to `v2.4.0`;
  • Loading branch information
dr-dimitru committed Feb 7, 2021
1 parent e0601e7 commit 3021ac1
Show file tree
Hide file tree
Showing 5 changed files with 2,310 additions and 534 deletions.
29 changes: 15 additions & 14 deletions .versions
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[email protected]
babel-compiler@7.5.3
babel-compiler@7.6.0
[email protected]
[email protected]
[email protected]
Expand All @@ -9,12 +9,12 @@ [email protected]
[email protected]
[email protected]
[email protected]
ddp-client@2.3.3
ddp-client@2.4.0
[email protected]
[email protected]
[email protected]
dynamic-import@0.5.2
ecmascript@0.14.3
dynamic-import@0.6.0
ecmascript@0.15.0
[email protected]
[email protected]
[email protected]
Expand All @@ -25,33 +25,34 @@ [email protected]
[email protected]
[email protected]
lmieulet:[email protected]
local-test:ostrio:[email protected].5
logging@1.1.20
local-test:ostrio:[email protected].6
logging@1.2.0
[email protected]
meteorhacks:[email protected]
meteortesting:[email protected]
meteortesting:[email protected]
meteortesting:[email protected]
[email protected].0
[email protected].1
[email protected]
modules@0.15.0
modules@0.16.0
[email protected]
[email protected].0
[email protected].1
[email protected].1
[email protected].2
[email protected]
[email protected]
[email protected]
[email protected]
ostrio:[email protected].5
ostrio:[email protected].6
practicalmeteor:[email protected]_1
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
webapp@1.9.1
webapp-hashing@1.0.9
webapp@1.10.0
webapp-hashing@1.1.0
13 changes: 5 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ const mongoErrorHandler = (error) => {
}
};

const defaultWriteConcern = {
w: 1,
j: true,
wtimeout: 10240
};

let equals;
equals = (a, b) => {
let i;
Expand Down Expand Up @@ -308,6 +302,7 @@ module.exports = class MailTime {
cursor.count((countError, count) => {
if (countError) {
ready();
cursor.close();
_logError('[___send] [count] [countError]', countError);
return;
}
Expand All @@ -323,7 +318,7 @@ module.exports = class MailTime {
$inc: {
tries: 1
}
}, defaultWriteConcern, (updateError) => {
}, (updateError) => {
if (count === ++finished) {
ready();
}
Expand Down Expand Up @@ -364,7 +359,7 @@ module.exports = class MailTime {
if (this.keepHistory) {
this.___triggerCallbacks(void 0, task, info);
} else {
this.collection.deleteOne({ _id: task._id }, defaultWriteConcern, () => {
this.collection.deleteOne({ _id: task._id }, () => {
this.___triggerCallbacks(void 0, task, info);
});
}
Expand All @@ -378,12 +373,14 @@ module.exports = class MailTime {
}
});
}, (forEachError) => {
cursor.close();
if (forEachError) {
_logError('[___send] [forEach] [forEachError]', forEachError);
}
});
} else {
ready();
cursor.close();
}
});
}
Expand Down
Loading

0 comments on commit 3021ac1

Please sign in to comment.