@resolveio/server-lib 20.14.25 → 20.14.26

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.
@@ -2529,12 +2529,11 @@ var SubscriptionManager = /** @class */ (function () {
2529
2529
  };
2530
2530
  SubscriptionManager.prototype.sendDataToOne = function (ws, messageId, sub, collection, type) {
2531
2531
  return __awaiter(this, void 0, void 0, function () {
2532
- var startMs, monitor, dependencySnapshot, res, execution, serverRes, err_1, _a, normalizedError, correlationId, serverRes, errorPayload, durationMs;
2532
+ var monitor, dependencySnapshot, res, execution, serverRes, err_1, _a, normalizedError, correlationId, serverRes, errorPayload;
2533
2533
  var _b;
2534
2534
  return __generator(this, function (_c) {
2535
2535
  switch (_c.label) {
2536
2536
  case 0:
2537
- startMs = Date.now();
2538
2537
  monitor = this._monitorManagerFunction.startMonitorFunction('User Specific Publication', sub.publication, '', '', sub.subscriptionData);
2539
2538
  _c.label = 1;
2540
2539
  case 1:
@@ -2600,22 +2599,7 @@ var SubscriptionManager = /** @class */ (function () {
2600
2599
  case 4:
2601
2600
  _c.sent();
2602
2601
  return [3 /*break*/, 7];
2603
- case 5:
2604
- durationMs = Date.now() - startMs;
2605
- if (durationMs >= this.PUBLICATION_DEBUG_THRESHOLD_MS) {
2606
- console.log(new Date(), '[Slow Publication]', {
2607
- durationMs: durationMs,
2608
- publication: sub.publication,
2609
- type: type,
2610
- collection: collection,
2611
- userSpecific: true,
2612
- id_user: ws['id_user'] || null,
2613
- id_ws: ws['id_socket'] || null,
2614
- clients: sub.clients ? sub.clients.length : 0,
2615
- subscriptionData: sub.subscriptionData
2616
- });
2617
- }
2618
- return [4 /*yield*/, this._monitorManagerFunction.finishMonitorFunction(monitor)];
2602
+ case 5: return [4 /*yield*/, this._monitorManagerFunction.finishMonitorFunction(monitor)];
2619
2603
  case 6:
2620
2604
  _c.sent();
2621
2605
  return [7 /*endfinally*/];
@@ -2627,7 +2611,7 @@ var SubscriptionManager = /** @class */ (function () {
2627
2611
  // Fetch pub once, send to all clients linked to this pub
2628
2612
  SubscriptionManager.prototype.sendDataToAll = function (sub, collection, type) {
2629
2613
  return __awaiter(this, void 0, void 0, function () {
2630
- var subIndex, startMs, monitor, res, dependencySnapshot, execution, packedRes, shouldCache, cachedBuffer, isSame, _a, _b, client, ws, serverRes, _c, _d, client, ws, serverRes, nodeCacheSize, deleteCount, subArr, zz, err_2, _e, normalizedError, correlationId, _f, _g, client, ws, serverRes, errorPayload, durationMs;
2614
+ var subIndex, monitor, res, dependencySnapshot, execution, packedRes, shouldCache, cachedBuffer, isSame, _a, _b, client, ws, serverRes, _c, _d, client, ws, serverRes, nodeCacheSize, deleteCount, subArr, zz, err_2, _e, normalizedError, correlationId, _f, _g, client, ws, serverRes, errorPayload;
2631
2615
  var e_6, _h, e_7, _j, e_8, _k;
2632
2616
  var _l, _m;
2633
2617
  return __generator(this, function (_o) {
@@ -2644,7 +2628,6 @@ var SubscriptionManager = /** @class */ (function () {
2644
2628
  }
2645
2629
  return [2 /*return*/];
2646
2630
  case 1:
2647
- startMs = Date.now();
2648
2631
  monitor = this._monitorManagerFunction.startMonitorFunction('Publication', sub.publication, '', '', sub.subscriptionData);
2649
2632
  res = void 0;
2650
2633
  dependencySnapshot = void 0;
@@ -2823,21 +2806,7 @@ var SubscriptionManager = /** @class */ (function () {
2823
2806
  case 5:
2824
2807
  _o.sent();
2825
2808
  return [3 /*break*/, 8];
2826
- case 6:
2827
- durationMs = Date.now() - startMs;
2828
- if (durationMs >= this.PUBLICATION_DEBUG_THRESHOLD_MS) {
2829
- console.log(new Date(), '[Slow Publication]', {
2830
- durationMs: durationMs,
2831
- publication: sub.publication,
2832
- type: type,
2833
- collection: collection,
2834
- userSpecific: false,
2835
- clients: sub.clients ? sub.clients.length : 0,
2836
- cacheId: sub.cacheId || 0,
2837
- subscriptionData: sub.subscriptionData
2838
- });
2839
- }
2840
- return [4 /*yield*/, this._monitorManagerFunction.finishMonitorFunction(monitor)];
2809
+ case 6: return [4 /*yield*/, this._monitorManagerFunction.finishMonitorFunction(monitor)];
2841
2810
  case 7:
2842
2811
  _o.sent();
2843
2812
  return [7 /*endfinally*/];