Browse Source

将日志 与 机器人状态详情进行缓存,

hl 3 weeks ago
parent
commit
c895feb00c
1 changed files with 1 additions and 8 deletions
  1. 1 8
      src/Interval.js

+ 1 - 8
src/Interval.js

@@ -159,14 +159,7 @@ function cachePredictorState() {
                         if(data.length < 50){
                             logger.info(`可能出错的data~~: ${data}`)
                         }
-                        let result = JSON.parse(data);
-                        if (predictorState.length === 0) {
-                            value.predictorState = result
-                        } else {
-                            if (predictorState[0] !== predictorState[0]) {
-                                value.predictorState = result
-                            }
-                        }
+                        value.predictorState = JSON.parse(data)
                     }).catch((error) => {
                     logger.info(`异步缓存predictorState异常~~ ${error.message}`)
                 });