mm_os 2.5.4 → 2.5.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/core/com/task/drive.js +13 -9
- package/package.json +2 -2
package/core/com/task/drive.js
CHANGED
|
@@ -227,15 +227,19 @@ Drive.prototype.setNum = function(func) {
|
|
|
227
227
|
var _this = this;
|
|
228
228
|
return function() {
|
|
229
229
|
if (_this.state === 'start') {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
230
|
+
try {
|
|
231
|
+
if (_this.config.num < 1) {
|
|
232
|
+
func();
|
|
233
|
+
} else if (_this.num < _this.config.num) {
|
|
234
|
+
func();
|
|
235
|
+
_this.num += 1;
|
|
236
|
+
} else {
|
|
237
|
+
func();
|
|
238
|
+
_this.clear();
|
|
239
|
+
_this.notify(_this.config.name, 'completed');
|
|
240
|
+
}
|
|
241
|
+
} catch (err) {
|
|
242
|
+
$.log.error("定时任务执行失败!", err);
|
|
239
243
|
}
|
|
240
244
|
}
|
|
241
245
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mm_os",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.5",
|
|
4
4
|
"description": "这是超级美眉服务端框架,用于快速构建应用程序。",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"mm_html": "^1.1.6",
|
|
42
42
|
"mm_koa_proxy": "^1.0.0",
|
|
43
43
|
"mm_logs": "^1.1.4",
|
|
44
|
-
"mm_machine": "^1.
|
|
44
|
+
"mm_machine": "^1.8.0",
|
|
45
45
|
"mm_mongodb": "^1.4.2",
|
|
46
46
|
"mm_mqtt": "^1.0.6",
|
|
47
47
|
"mm_mysql": "^1.8.3",
|