Procházet zdrojové kódy

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

hl před 5 měsíci
rodič
revize
294a2737e3
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      src/robot.js

+ 1 - 1
src/robot.js

@@ -560,7 +560,7 @@ function predictorState(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"
-    exec(`curl -X GET -H "auth: ${config.headers.auth}" -H "token: ${config.headers.token}" "http://127.0.0.1:${port}/predictor_state"`, (error, stdout, stderr) => {
+    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": `获取状态请求失败`}