@resolveio/server-lib 4.0.17 → 4.0.19

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.
@@ -502,8 +502,10 @@ var SubscriptionManager = /** @class */ (function () {
502
502
  SubscriptionManager.prototype.runOpLogQueue = function () {
503
503
  var _this = this;
504
504
  setInterval(function () {
505
- var oplog = _this._oplogQueue.pop();
506
- _this.checkPubsForChanges(oplog.collection, oplog.doc, oplog.type);
505
+ if (_this._oplogQueue.length) {
506
+ var oplog = _this._oplogQueue.pop();
507
+ _this.checkPubsForChanges(oplog.collection, oplog.doc, oplog.type);
508
+ }
507
509
  // let oplogQueue = deepCopy(this._oplogQueue);
508
510
  // let uniqueCollectionOplogQueue = oplogQueue.map(a => a.collection).filter((elem, index, self) => {
509
511
  // return index === self.indexOf(elem);
@@ -721,6 +723,7 @@ var SubscriptionManager = /** @class */ (function () {
721
723
  var _this = this;
722
724
  return __generator(this, function (_c) {
723
725
  that = this;
726
+ that._mainServer.getMethodManager().callMethodInternal('insertSubscriptionLog', type, subscription.publication, collection);
724
727
  if (!that._publications[subscription.publication].ws_specific) { // Same pub for all users
725
728
  (_a = that._publications[subscription.publication].function).call.apply(_a, [Object.assign({}, that, SubscriptionManager.prototype)].concat(subscription.subscriptionData)).then(function (res) {
726
729
  var serverRes = {
@@ -767,7 +770,7 @@ var SubscriptionManager = /** @class */ (function () {
767
770
  var _this = this;
768
771
  return __generator(this, function (_b) {
769
772
  that = this;
770
- that._mainServer.getMethodManager().callMethodInternal('insertLogSubscription', type, subscription.publication, collection);
773
+ that._mainServer.getMethodManager().callMethodInternal('insertSubscriptionLog', type, subscription.publication, collection);
771
774
  (_a = that._publications[subscription.publication].function).call.apply(_a, [Object.assign({}, that, SubscriptionManager.prototype)].concat(subscription.subscriptionData)).then(function (res) {
772
775
  subscription.clients.forEach(function (client) {
773
776
  that._wss.clients.forEach(function (ws) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolveio/server-lib",
3
- "version": "4.0.17",
3
+ "version": "4.0.19",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "scripts": {