@resolveio/server-lib 5.0.0-rc-2 → 5.0.0
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.
|
@@ -51,6 +51,7 @@ var method_responses_1 = require("../publications/method-responses");
|
|
|
51
51
|
var support_tickets_1 = require("../publications/support-tickets");
|
|
52
52
|
var index_1 = require("../index");
|
|
53
53
|
var notifications_1 = require("../publications/notifications");
|
|
54
|
+
var common_1 = require("../util/common");
|
|
54
55
|
var billing_logged_in_users_collection_1 = require("../collections/billing-logged-in-users.collection");
|
|
55
56
|
var moment = require("moment");
|
|
56
57
|
var billing_logged_in_users_1 = require("../publications/billing-logged-in-users");
|
|
@@ -725,6 +726,10 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
725
726
|
that._mainServer.getMethodManager().callMethodInternal('insertSubscriptionLog', type, subscription.publication, collection, JSON.stringify(subscription.subscriptionData));
|
|
726
727
|
}
|
|
727
728
|
(_a = that._publications[subscription.publication].function).call.apply(_a, [Object.assign({}, that, SubscriptionManager.prototype)].concat(subscription.subscriptionData)).then(function (res) {
|
|
729
|
+
console.log(common_1.getBinarySize(JSON.stringify(_this._subCache)));
|
|
730
|
+
if (common_1.getBinarySize(JSON.stringify(_this._subCache)) < 750000000) {
|
|
731
|
+
_this._subCache.splice(0, 1);
|
|
732
|
+
}
|
|
728
733
|
_this._subCache.push({ publication: subscription.publication, subscriptionData: subscription.subscriptionData, res: res });
|
|
729
734
|
var serverRes = {
|
|
730
735
|
messageId: messageId,
|
|
@@ -791,6 +796,10 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
791
796
|
that._mainServer.getMethodManager().callMethodInternal('insertSubscriptionLog', type, subscription.publication, collection, JSON.stringify(subscription.subscriptionData));
|
|
792
797
|
}
|
|
793
798
|
(_a = that._publications[subscription.publication].function).call.apply(_a, [Object.assign({}, that, SubscriptionManager.prototype)].concat(subscription.subscriptionData)).then(function (res) {
|
|
799
|
+
console.log(common_1.getBinarySize(JSON.stringify(_this._subCache)));
|
|
800
|
+
if (common_1.getBinarySize(JSON.stringify(_this._subCache)) < 750000000) {
|
|
801
|
+
_this._subCache.splice(0, 1);
|
|
802
|
+
}
|
|
794
803
|
_this._subCache.push({ publication: subscription.publication, subscriptionData: subscription.subscriptionData, res: res });
|
|
795
804
|
subscription.clients.forEach(function (client) {
|
|
796
805
|
that._wss.clients.forEach(function (ws) {
|