Explorar o código

新增-新策略对应 获取机器人状态接口

hl hai 5 meses
pai
achega
70645b276c
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      src/web.js

+ 3 - 3
src/web.js

@@ -146,10 +146,10 @@ function init() {
 
         if (port !== -1) {
             logger.info('#####################predictorState:');
-            var accUrl = "http://127.0.0.1:" + port
             var config = getRustConfig()
-
-            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) => {
+            var com = `curl -X GET -H "auth: 4L" -H "token: r7T$8gBV!f&L@E2+" "http://127.0.0.1:${port}/predictor_state"`;
+            logger.info('#####################com:', com);
+            execSync(com, (error, stdout, stderr) => {
                 if (error) {
                     logger.info(`#####################汇报:获取状态请求失败: ${error.message}`)
                     res.send({'code': -1, 'data': null, "message": `获取状态请求失败`});