@resolveio/server-lib 5.0.0-rc-2 → 5.0.0-rc-3
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,7 +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) {
|
|
728
|
-
|
|
729
|
+
console.log(common_1.getBinarySize(JSON.stringify(_this._subCache)));
|
|
730
|
+
if (common_1.getBinarySize(JSON.stringify(_this._subCache)) < 500000000) {
|
|
731
|
+
_this._subCache.push({ publication: subscription.publication, subscriptionData: subscription.subscriptionData, res: res });
|
|
732
|
+
}
|
|
729
733
|
var serverRes = {
|
|
730
734
|
messageId: messageId,
|
|
731
735
|
hasError: false,
|
|
@@ -791,7 +795,10 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
791
795
|
that._mainServer.getMethodManager().callMethodInternal('insertSubscriptionLog', type, subscription.publication, collection, JSON.stringify(subscription.subscriptionData));
|
|
792
796
|
}
|
|
793
797
|
(_a = that._publications[subscription.publication].function).call.apply(_a, [Object.assign({}, that, SubscriptionManager.prototype)].concat(subscription.subscriptionData)).then(function (res) {
|
|
794
|
-
|
|
798
|
+
console.log(common_1.getBinarySize(JSON.stringify(_this._subCache)));
|
|
799
|
+
if (common_1.getBinarySize(JSON.stringify(_this._subCache)) < 500000000) {
|
|
800
|
+
_this._subCache.push({ publication: subscription.publication, subscriptionData: subscription.subscriptionData, res: res });
|
|
801
|
+
}
|
|
795
802
|
subscription.clients.forEach(function (client) {
|
|
796
803
|
that._wss.clients.forEach(function (ws) {
|
|
797
804
|
if (ws['id_socket'] === client.id_socket) {
|