wingbot-mongodb 2.21.6 → 2.21.7
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/package.json +1 -1
- package/src/NotificationsStorage.js +11 -0
package/package.json
CHANGED
|
@@ -100,6 +100,17 @@ class NotificationsStorage {
|
|
|
100
100
|
* @type {Map<string,Promise<mongodb.Collection>>}
|
|
101
101
|
*/
|
|
102
102
|
this._collections = new Map();
|
|
103
|
+
|
|
104
|
+
if (isCosmo && !process.argv.some((a) => a.endsWith('mocha'))) {
|
|
105
|
+
process.nextTick(() => {
|
|
106
|
+
Promise.all([
|
|
107
|
+
this._getCollection(this.taksCollection),
|
|
108
|
+
this._getCollection(this.campaignsCollection),
|
|
109
|
+
this._getCollection(this.subscribtionsCollection)
|
|
110
|
+
])
|
|
111
|
+
.catch((e) => log.error('DB.<NotificationsStorage> index pre-heat FAILED', e));
|
|
112
|
+
});
|
|
113
|
+
}
|
|
103
114
|
}
|
|
104
115
|
|
|
105
116
|
async _getOrCreateCollection (name) {
|