yangyj 1 rok temu
rodzic
commit
4b624e1458

+ 14 - 9
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/WbsParamController.java

@@ -602,15 +602,20 @@ public class WbsParamController {
 
     @Scheduled(fixedDelay = 30000)
     public  void monitor(){
-        System.out.println("treeCode刷新检测"+ LocalDateTime.now());
-       String tcu= this.redisTemplate.opsForValue().get("tcu");
-       if(Func.isNotBlank(tcu)){
-           assert tcu != null;
-           Arrays.stream(tcu.split(",")).filter(StringUtils::isNumber).distinct().forEach(id->{
-               this.service.treeCode(Long.parseLong(id),null);
-           });
-           this.redisTemplate.delete("tcu");
-       }
+        /*System.out.println("treeCode刷新检测"+ LocalDateTime.now());*/
+        try {
+            String tcu= this.redisTemplate.opsForValue().get("tcu");
+            if(Func.isNotBlank(tcu)){
+                assert tcu != null;
+                Arrays.stream(tcu.split(",")).filter(StringUtils::isNumber).distinct().forEach(id->{
+                    this.service.treeCode(Long.parseLong(id),null);
+                });
+                this.redisTemplate.delete("tcu");
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+
     }