@resolveio/server-lib 12.0.13 → 12.0.14
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/managers/mongo.manager.d.ts +1 -0
- package/managers/mongo.manager.js +4 -0
- package/managers/mongo.manager.js.map +1 -1
- package/managers/subscription.manager.d.ts +2 -1
- package/managers/subscription.manager.js +14 -16
- package/managers/subscription.manager.js.map +1 -1
- package/package.json +1 -1
- package/server-app.js +229 -236
- package/server-app.js.map +1 -1
|
@@ -27,6 +27,7 @@ export declare class MongoManager {
|
|
|
27
27
|
private _heapLimit;
|
|
28
28
|
private _serverCollections;
|
|
29
29
|
private _debugMongoQueueHits;
|
|
30
|
+
private _debugRemoveCacheHits;
|
|
30
31
|
constructor();
|
|
31
32
|
getServerCollections(): string[];
|
|
32
33
|
registerCollection(collection: Collection<any>): void;
|
|
@@ -80,6 +80,7 @@ var MongoManager = /** @class */ (function () {
|
|
|
80
80
|
this._heapLimit = 0;
|
|
81
81
|
this._serverCollections = [];
|
|
82
82
|
this._debugMongoQueueHits = 0;
|
|
83
|
+
this._debugRemoveCacheHits = 0;
|
|
83
84
|
this._nodeCache = new NodeCache({ stdTTL: 0, checkperiod: 0 });
|
|
84
85
|
this._heapLimit = this._heapStats.heap_size_limit / 4;
|
|
85
86
|
index_1.ResolveIOServer.getMainDB().listCollections().toArray().then(function (collections) {
|
|
@@ -90,7 +91,9 @@ var MongoManager = /** @class */ (function () {
|
|
|
90
91
|
console.log(new Date(), 'Mongo Manager', 'Mongo Queue', _this._mongoQueue.length);
|
|
91
92
|
console.log(new Date(), 'Mongo Manager', 'Server Collections', _this._serverCollections.length);
|
|
92
93
|
console.log(new Date(), 'Mongo Manager', 'Mongo Queue Hits', _this._debugMongoQueueHits);
|
|
94
|
+
console.log(new Date(), 'Sub Manager', 'Cache Cleanup Hits', _this._debugRemoveCacheHits);
|
|
93
95
|
_this._debugMongoQueueHits = 0;
|
|
96
|
+
_this._debugRemoveCacheHits = 0;
|
|
94
97
|
}, 60000);
|
|
95
98
|
this.runQueue();
|
|
96
99
|
}
|
|
@@ -243,6 +246,7 @@ var MongoManager = /** @class */ (function () {
|
|
|
243
246
|
var deleteCount = 0;
|
|
244
247
|
var queueArr = this._mongoQueue.filter(function (a) { return a.cacheId && !a.running && !a.cbs.length; });
|
|
245
248
|
for (var zz = queueArr.length - 1; zz >= 0; zz--) {
|
|
249
|
+
this._debugRemoveCacheHits += 1;
|
|
246
250
|
var queue = queueArr[zz];
|
|
247
251
|
this._nodeCache.del(queue.cacheId);
|
|
248
252
|
queue.cacheId = 0;
|