Forráskód Böngészése

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

hl 5 hónapja
szülő
commit
294a2737e3
1 módosított fájl, 1 hozzáadás és 1 törlés
  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": `获取状态请求失败`}