abler-api 0.1.56 → 0.1.58
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/cjs/pp-util.js +8 -9
- package/package.json +1 -1
package/dist/cjs/pp-util.js
CHANGED
|
@@ -315,8 +315,7 @@ class apiUtil$2 {
|
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
}, function (error) {
|
|
318
|
-
console.log('ERROR:', error);
|
|
319
|
-
|
|
318
|
+
// console.log('ERROR:', error);
|
|
320
319
|
if (!response.finished) {
|
|
321
320
|
response.send(error);
|
|
322
321
|
}
|
|
@@ -334,7 +333,7 @@ class apiUtil$2 {
|
|
|
334
333
|
// console.log('RES:', apiSuccess(data));
|
|
335
334
|
if (!response.finished) response.send(apiUtil$2.apiSuccess(data, response.req));
|
|
336
335
|
}, function (error) {
|
|
337
|
-
console.log('ERROR:', error);
|
|
336
|
+
// console.log('ERROR:', error);
|
|
338
337
|
if (!response.finished) response.send(apiUtil$2.apiFail(error, response.req));
|
|
339
338
|
});
|
|
340
339
|
}
|
|
@@ -353,7 +352,7 @@ class apiUtil$2 {
|
|
|
353
352
|
|
|
354
353
|
if (!response.finished) response.send(responseData);
|
|
355
354
|
}, function (error) {
|
|
356
|
-
console.log('ERROR:', error);
|
|
355
|
+
// console.log('ERROR:', error);
|
|
357
356
|
let responseData = apiUtil$2.spoApiFail(error, response.req);
|
|
358
357
|
|
|
359
358
|
apiUtil$2._saveApiCallRec(response.req.apiCallRec, responseData);
|
|
@@ -2109,11 +2108,11 @@ class schedule$1 {
|
|
|
2109
2108
|
|
|
2110
2109
|
let enabled = // PM2配置中指定了环境变量 SCHEDULE_ENABLED
|
|
2111
2110
|
!!process.env.SCHEDULE_ENABLED // 如果PM2启动了多个进程,则只在第一个进程执行
|
|
2112
|
-
&& process.env.NODE_APP_INSTANCE === '0'; // 如果有多台服务器,则只在第一台执行
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2111
|
+
&& process.env.NODE_APP_INSTANCE === '0'; // // 如果有多台服务器,则只在第一台执行
|
|
2112
|
+
// if (enabled && conf.appSetting.serverHosts && (conf.appSetting.serverHosts.length > 1)) {
|
|
2113
|
+
// enabled = conf.myMsgAddr.indexOf(conf.appSetting.serverHosts[0]) === 0;
|
|
2114
|
+
// }
|
|
2115
|
+
// todo: 暂时取消此限制,要通过配置设定
|
|
2117
2116
|
|
|
2118
2117
|
return enabled;
|
|
2119
2118
|
}
|