backendless 7.0.3 → 7.0.5
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.
- package/dist/backendless.js +13 -5
- package/dist/backendless.js.map +1 -1
- package/dist/backendless.min.js +2 -2
- package/es/logging/index.js +12 -4
- package/lib/logging/index.js +12 -4
- package/package.json +1 -1
- package/src/logging/index.js +10 -2
package/es/logging/index.js
CHANGED
|
@@ -126,9 +126,17 @@ var Logging = /*#__PURE__*/function () {
|
|
|
126
126
|
}, {
|
|
127
127
|
key: "checkMessagesLen",
|
|
128
128
|
value: function checkMessagesLen() {
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
var _this3 = this;
|
|
130
|
+
if (this.checkMessagesLenTimer) {
|
|
131
|
+
clearTimeout(this.checkMessagesLenTimer);
|
|
131
132
|
}
|
|
133
|
+
this.checkMessagesLenTimer = setTimeout(function () {
|
|
134
|
+
if (_this3.messages.length >= _this3.numOfMessages) {
|
|
135
|
+
_this3.flush();
|
|
136
|
+
} else {
|
|
137
|
+
_this3.startFlushInterval();
|
|
138
|
+
}
|
|
139
|
+
}, 0);
|
|
132
140
|
}
|
|
133
141
|
}, {
|
|
134
142
|
key: "checkMessagesLimit",
|
|
@@ -140,10 +148,10 @@ var Logging = /*#__PURE__*/function () {
|
|
|
140
148
|
}, {
|
|
141
149
|
key: "startFlushInterval",
|
|
142
150
|
value: function startFlushInterval() {
|
|
143
|
-
var
|
|
151
|
+
var _this4 = this;
|
|
144
152
|
if (!this.flushInterval) {
|
|
145
153
|
this.flushInterval = setTimeout(function () {
|
|
146
|
-
return
|
|
154
|
+
return _this4.flush();
|
|
147
155
|
}, this.timeFrequency * 1000);
|
|
148
156
|
}
|
|
149
157
|
}
|
package/lib/logging/index.js
CHANGED
|
@@ -126,9 +126,17 @@ var Logging = /*#__PURE__*/function () {
|
|
|
126
126
|
}, {
|
|
127
127
|
key: "checkMessagesLen",
|
|
128
128
|
value: function checkMessagesLen() {
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
var _this3 = this;
|
|
130
|
+
if (this.checkMessagesLenTimer) {
|
|
131
|
+
clearTimeout(this.checkMessagesLenTimer);
|
|
131
132
|
}
|
|
133
|
+
this.checkMessagesLenTimer = setTimeout(function () {
|
|
134
|
+
if (_this3.messages.length >= _this3.numOfMessages) {
|
|
135
|
+
_this3.flush();
|
|
136
|
+
} else {
|
|
137
|
+
_this3.startFlushInterval();
|
|
138
|
+
}
|
|
139
|
+
}, 0);
|
|
132
140
|
}
|
|
133
141
|
}, {
|
|
134
142
|
key: "checkMessagesLimit",
|
|
@@ -140,10 +148,10 @@ var Logging = /*#__PURE__*/function () {
|
|
|
140
148
|
}, {
|
|
141
149
|
key: "startFlushInterval",
|
|
142
150
|
value: function startFlushInterval() {
|
|
143
|
-
var
|
|
151
|
+
var _this4 = this;
|
|
144
152
|
if (!this.flushInterval) {
|
|
145
153
|
this.flushInterval = setTimeout(function () {
|
|
146
|
-
return
|
|
154
|
+
return _this4.flush();
|
|
147
155
|
}, this.timeFrequency * 1000);
|
|
148
156
|
}
|
|
149
157
|
}
|
package/package.json
CHANGED
package/src/logging/index.js
CHANGED
|
@@ -103,9 +103,17 @@ export default class Logging {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
checkMessagesLen() {
|
|
106
|
-
if (this.
|
|
107
|
-
this.
|
|
106
|
+
if (this.checkMessagesLenTimer) {
|
|
107
|
+
clearTimeout(this.checkMessagesLenTimer)
|
|
108
108
|
}
|
|
109
|
+
|
|
110
|
+
this.checkMessagesLenTimer = setTimeout(() => {
|
|
111
|
+
if (this.messages.length >= this.numOfMessages) {
|
|
112
|
+
this.flush()
|
|
113
|
+
} else {
|
|
114
|
+
this.startFlushInterval()
|
|
115
|
+
}
|
|
116
|
+
}, 0)
|
|
109
117
|
}
|
|
110
118
|
|
|
111
119
|
checkMessagesLimit() {
|