mm_os 2.5.3 → 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/mqtt/index.js
CHANGED
|
@@ -454,9 +454,7 @@ MQTT.prototype.update_online = async function() {
|
|
|
454
454
|
var dict = list[i].drives;
|
|
455
455
|
for (var clientid in dict) {
|
|
456
456
|
var o = dict[clientid];
|
|
457
|
-
if (o.online ===
|
|
458
|
-
list_offline.push(clientid);
|
|
459
|
-
} else {
|
|
457
|
+
if (o.online === 1) {
|
|
460
458
|
if (o.time_last) {
|
|
461
459
|
var cha = now - o.time_last;
|
|
462
460
|
if (cha > online_expires) {
|
|
@@ -469,6 +467,8 @@ MQTT.prototype.update_online = async function() {
|
|
|
469
467
|
} else {
|
|
470
468
|
list_online.push(clientid);
|
|
471
469
|
}
|
|
470
|
+
} else {
|
|
471
|
+
list_offline.push(clientid);
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
}
|
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",
|