@resolveio/server-lib 4.1.3 → 4.1.4
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.
|
@@ -723,7 +723,8 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
723
723
|
var _this = this;
|
|
724
724
|
return __generator(this, function (_c) {
|
|
725
725
|
that = this;
|
|
726
|
-
|
|
726
|
+
if (subscription.publication !== 'superadminAPM')
|
|
727
|
+
that._mainServer.getMethodManager().callMethodInternal('insertSubscriptionLog', type, subscription.publication, collection);
|
|
727
728
|
if (!that._publications[subscription.publication].ws_specific) { // Same pub for all users
|
|
728
729
|
(_a = that._publications[subscription.publication].function).call.apply(_a, [Object.assign({}, that, SubscriptionManager.prototype)].concat(subscription.subscriptionData)).then(function (res) {
|
|
729
730
|
var serverRes = {
|
package/package.json
CHANGED
package/publications/logs.js
CHANGED
|
@@ -101,6 +101,11 @@ function loadLogPublications(subscriptionManager) {
|
|
|
101
101
|
latency_avg: { $avg: '$latency_ms' },
|
|
102
102
|
latency_max: { $max: '$latency_ms' }
|
|
103
103
|
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
$sort: {
|
|
107
|
+
latency_avg: -1
|
|
108
|
+
}
|
|
104
109
|
}
|
|
105
110
|
])];
|
|
106
111
|
case 1:
|
|
@@ -124,6 +129,11 @@ function loadLogPublications(subscriptionManager) {
|
|
|
124
129
|
subscription: { $first: '$subscription' },
|
|
125
130
|
count: { $sum: 1 }
|
|
126
131
|
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
$sort: {
|
|
135
|
+
count: -1
|
|
136
|
+
}
|
|
127
137
|
}
|
|
128
138
|
])];
|
|
129
139
|
case 2:
|