utiller 1.0.54 → 1.0.57
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/lib/pooller/index.js
CHANGED
|
@@ -97,11 +97,11 @@ var InfinitePool = /*#__PURE__*/function () {
|
|
|
97
97
|
while (1) {
|
|
98
98
|
switch (_context.prev = _context.next) {
|
|
99
99
|
case 0:
|
|
100
|
-
_this.
|
|
100
|
+
_this.terminate();
|
|
101
101
|
|
|
102
102
|
case 1:
|
|
103
103
|
if (!(_lodash["default"].size(_this.executingTaskQueue) > 0)) {
|
|
104
|
-
_context.next =
|
|
104
|
+
_context.next = 8;
|
|
105
105
|
break;
|
|
106
106
|
}
|
|
107
107
|
|
|
@@ -111,13 +111,15 @@ var InfinitePool = /*#__PURE__*/function () {
|
|
|
111
111
|
case 4:
|
|
112
112
|
_index2.utiller.appendInfo(_this.getPoollerLogFormat("\u54AC\u5728 stopInBackground \u51FA\u4E0D\u4F86"));
|
|
113
113
|
|
|
114
|
+
_this.showState();
|
|
115
|
+
|
|
114
116
|
_context.next = 1;
|
|
115
117
|
break;
|
|
116
118
|
|
|
117
|
-
case
|
|
119
|
+
case 8:
|
|
118
120
|
return _context.abrupt("return", true);
|
|
119
121
|
|
|
120
|
-
case
|
|
122
|
+
case 9:
|
|
121
123
|
case "end":
|
|
122
124
|
return _context.stop();
|
|
123
125
|
}
|
|
@@ -304,18 +306,20 @@ var InfinitePool = /*#__PURE__*/function () {
|
|
|
304
306
|
|
|
305
307
|
case 14:
|
|
306
308
|
if (!_this.isRunning()) {
|
|
307
|
-
_context2.next =
|
|
309
|
+
_context2.next = 20;
|
|
308
310
|
break;
|
|
309
311
|
}
|
|
310
312
|
|
|
311
|
-
|
|
313
|
+
_index2.utiller.appendInfo(_this.getPoollerLogFormat("isRunning:".concat(_this.isRunning(), " , \u9084\u5728\u57F7\u884C\u4E2D")));
|
|
314
|
+
|
|
315
|
+
_context2.next = 18;
|
|
312
316
|
return (0, _classPrivateFieldGet2["default"])(_this, _run).call(_this);
|
|
313
317
|
|
|
314
|
-
case
|
|
318
|
+
case 18:
|
|
315
319
|
_context2.next = 14;
|
|
316
320
|
break;
|
|
317
321
|
|
|
318
|
-
case
|
|
322
|
+
case 20:
|
|
319
323
|
case "end":
|
|
320
324
|
return _context2.stop();
|
|
321
325
|
}
|
|
@@ -375,18 +379,20 @@ var InfinitePool = /*#__PURE__*/function () {
|
|
|
375
379
|
|
|
376
380
|
case 11:
|
|
377
381
|
if (!(_this.isRunning() && !_lodash["default"].isEmpty(_this.paramQueue))) {
|
|
378
|
-
_context3.next =
|
|
382
|
+
_context3.next = 17;
|
|
379
383
|
break;
|
|
380
384
|
}
|
|
381
385
|
|
|
382
|
-
|
|
386
|
+
_index2.utiller.appendInfo(_this.getPoollerLogFormat("\u9084\u5728\u904B\u884C\u4E2D "));
|
|
387
|
+
|
|
388
|
+
_context3.next = 15;
|
|
383
389
|
return (0, _classPrivateFieldGet2["default"])(_this, _run).call(_this);
|
|
384
390
|
|
|
385
|
-
case
|
|
391
|
+
case 15:
|
|
386
392
|
_context3.next = 11;
|
|
387
393
|
break;
|
|
388
394
|
|
|
389
|
-
case
|
|
395
|
+
case 17:
|
|
390
396
|
case "end":
|
|
391
397
|
return _context3.stop();
|
|
392
398
|
}
|
|
@@ -911,7 +917,7 @@ var InfinitePool = /*#__PURE__*/function () {
|
|
|
911
917
|
}
|
|
912
918
|
|
|
913
919
|
if (this.state === _configerer.configerer.POOLLER_STATE.RUN_BY_EACH_TASK) {
|
|
914
|
-
/** 因為不這樣做, 就會產生 race condition, 會產生出3個
|
|
920
|
+
/** 因為不這樣做, 就會產生 race condition, 會產生出3個runInBackGround instance */
|
|
915
921
|
this.runByEachTaskInBackGround();
|
|
916
922
|
return;
|
|
917
923
|
}
|
|
@@ -1055,7 +1055,7 @@ var NodeUtiller = /*#__PURE__*/function (_Utiller) {
|
|
|
1055
1055
|
isError ? (_console = console).error.apply(_console, (0, _toConsumableArray2["default"])(datas)) : (_console2 = console).log.apply(_console2, (0, _toConsumableArray2["default"])(datas));
|
|
1056
1056
|
}
|
|
1057
1057
|
|
|
1058
|
-
var persistlog = "".concat(
|
|
1058
|
+
var persistlog = "".concat(this.getCurrentTimeFormat(), " ").concat(isError ? "ERROR" : "LOG", " : ").concat(this.getLogString(datas));
|
|
1059
1059
|
this.appendFile(path, persistlog);
|
|
1060
1060
|
}
|
|
1061
1061
|
}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "utiller",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.57",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"license": "ISC",
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"bl": "^4.1.0",
|
|
16
|
-
"configerer": "^1.0.
|
|
16
|
+
"configerer": "^1.0.11",
|
|
17
17
|
"crypto-js": "^4.0.0",
|
|
18
18
|
"del": "^6.0.0",
|
|
19
19
|
"fs-extra": "^9.1.0",
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"configerer": "^1.0.
|
|
14
|
-
"utiller": "^1.0.
|
|
13
|
+
"configerer": "^1.0.11",
|
|
14
|
+
"utiller": "^1.0.56",
|
|
15
15
|
"linepayer": "^1.0.4",
|
|
16
|
-
"databazer": "^1.0.
|
|
16
|
+
"databazer": "^1.0.9",
|
|
17
17
|
"lodash": "^4.17.20",
|
|
18
18
|
"moment": "^2.29.1"
|
|
19
19
|
},
|