|
@@ -555,20 +555,20 @@ function delRobot(app) {
|
|
|
|
|
|
// 新策略-获取状态
|
|
|
function predictorState(port) {
|
|
|
- logger.info('#####################predictorState:');
|
|
|
- var accUrl = "http://127.0.0.1:" + port
|
|
|
- var config = getRustConfig()
|
|
|
-
|
|
|
- // curl -X GET -H "auth: 4L" -H "token: r7T\$8gBV\!f&L@E2+" "http://127.0.0.1:111/predictor_state"
|
|
|
- execSync(`curl -X GET -H "auth: ${config.headers.auth}" -H "token: ${config.headers.token}" "http://127.0.0.1:${port}/predictor_state"`, (error, stdout, stderr) => {
|
|
|
- if (error) {
|
|
|
- logger.info(`#####################汇报:获取状态请求失败: ${error.message}`)
|
|
|
- return {'code': -1, 'data': null, "message": `获取状态请求失败`}
|
|
|
- }
|
|
|
-
|
|
|
- logger.info('#####################-d', stdout);
|
|
|
- return {'code': 200, 'data': stdout, "message": "SUCCESS"}
|
|
|
- });
|
|
|
+ // logger.info('#####################predictorState:');
|
|
|
+ // var accUrl = "http://127.0.0.1:" + port
|
|
|
+ // var config = getRustConfig()
|
|
|
+ //
|
|
|
+ // // curl -X GET -H "auth: 4L" -H "token: r7T\$8gBV\!f&L@E2+" "http://127.0.0.1:111/predictor_state"
|
|
|
+ // execSync(`curl -X GET -H "auth: ${config.headers.auth}" -H "token: ${config.headers.token}" "http://127.0.0.1:${port}/predictor_state"`, (error, stdout, stderr) => {
|
|
|
+ // if (error) {
|
|
|
+ // logger.info(`#####################汇报:获取状态请求失败: ${error.message}`)
|
|
|
+ // return {'code': -1, 'data': null, "message": `获取状态请求失败`}
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // logger.info('#####################-d', stdout);
|
|
|
+ // return {'code': 200, 'data': stdout, "message": "SUCCESS"}
|
|
|
+ // });
|
|
|
|
|
|
// //拿到策略余额
|
|
|
// try {
|