wingbot-mongodb 2.21.4 → 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/.nyc_output/3f353199-a556-47d3-b49c-a1a48d9c29f4.json +1 -0
- package/.nyc_output/processinfo/{feb4a098-7fff-42f7-b475-9771b6201741.json → 3f353199-a556-47d3-b49c-a1a48d9c29f4.json} +1 -1
- package/.nyc_output/processinfo/index.json +1 -1
- package/package.json +1 -1
- package/src/BaseStorage.js +1 -1
- package/src/NotificationsStorage.js +12 -2
- package/.nyc_output/feb4a098-7fff-42f7-b475-9771b6201741.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"parent":null,"pid":
|
|
1
|
+
{"parent":null,"pid":87130,"argv":["/usr/local/bin/node","/Users/david/Development/wingbot-mongodb/node_modules/.bin/mocha","./test"],"execArgv":[],"cwd":"/Users/david/Development/wingbot-mongodb","time":1660039233919,"ppid":87129,"coverageFilename":"/Users/david/Development/wingbot-mongodb/.nyc_output/3f353199-a556-47d3-b49c-a1a48d9c29f4.json","externalId":"","uuid":"3f353199-a556-47d3-b49c-a1a48d9c29f4","files":["/Users/david/Development/wingbot-mongodb/src/AttachmentCache.js","/Users/david/Development/wingbot-mongodb/src/AuditLogStorage.js","/Users/david/Development/wingbot-mongodb/src/BaseStorage.js","/Users/david/Development/wingbot-mongodb/src/BotConfigStorage.js","/Users/david/Development/wingbot-mongodb/src/BotTokenStorage.js","/Users/david/Development/wingbot-mongodb/src/tokenFactory.js","/Users/david/Development/wingbot-mongodb/src/ChatLogStorage.js","/Users/david/Development/wingbot-mongodb/src/NotificationsStorage.js","/Users/david/Development/wingbot-mongodb/src/StateStorage.js"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"processes":{"
|
|
1
|
+
{"processes":{"3f353199-a556-47d3-b49c-a1a48d9c29f4":{"parent":null,"children":[]}},"files":{"/Users/david/Development/wingbot-mongodb/src/AttachmentCache.js":["3f353199-a556-47d3-b49c-a1a48d9c29f4"],"/Users/david/Development/wingbot-mongodb/src/AuditLogStorage.js":["3f353199-a556-47d3-b49c-a1a48d9c29f4"],"/Users/david/Development/wingbot-mongodb/src/BaseStorage.js":["3f353199-a556-47d3-b49c-a1a48d9c29f4"],"/Users/david/Development/wingbot-mongodb/src/BotConfigStorage.js":["3f353199-a556-47d3-b49c-a1a48d9c29f4"],"/Users/david/Development/wingbot-mongodb/src/BotTokenStorage.js":["3f353199-a556-47d3-b49c-a1a48d9c29f4"],"/Users/david/Development/wingbot-mongodb/src/tokenFactory.js":["3f353199-a556-47d3-b49c-a1a48d9c29f4"],"/Users/david/Development/wingbot-mongodb/src/ChatLogStorage.js":["3f353199-a556-47d3-b49c-a1a48d9c29f4"],"/Users/david/Development/wingbot-mongodb/src/NotificationsStorage.js":["3f353199-a556-47d3-b49c-a1a48d9c29f4"],"/Users/david/Development/wingbot-mongodb/src/StateStorage.js":["3f353199-a556-47d3-b49c-a1a48d9c29f4"]},"externalIds":{}}
|
package/package.json
CHANGED
package/src/BaseStorage.js
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) {
|
|
@@ -242,8 +253,7 @@ class NotificationsStorage {
|
|
|
242
253
|
if (i.isTextIndex) {
|
|
243
254
|
this._doesNotSupportTextIndex = true;
|
|
244
255
|
} else {
|
|
245
|
-
this._log.error(`failed to create index ${i.options.name} on ${collection.collectionName}
|
|
246
|
-
throw e;
|
|
256
|
+
this._log.error(`failed to create index ${i.options.name} on ${collection.collectionName}`, e);
|
|
247
257
|
}
|
|
248
258
|
})));
|
|
249
259
|
}
|