Jelajahi Sumber

增加计算进度通知

dsx 2 tahun lalu
induk
melakukan
1a05a9e1c2

+ 3 - 1
src/main/java/com/fdkankan/contro/mq/service/impl/BuildSceneProgressServiceImpl.java

@@ -95,7 +95,7 @@ public class BuildSceneProgressServiceImpl implements IBuildSceneProgressService
 
                 @Override
                 public void onModify(WatchEvent<?> event, Path currentPath) {
-                    log.info("project.json文件发生了变化");
+                    log.info("发生了变化,小飞棍来惹。。。。。");
                     String projectJsonStr = FileUtil.readUtf8String(file);
                     JSONObject projectJson = JSON.parseObject(projectJsonStr);
                     JSONObject state = projectJson.getJSONObject("state");
@@ -120,6 +120,7 @@ public class BuildSceneProgressServiceImpl implements IBuildSceneProgressService
                         executor.shutdown();
                     } else {
                         int progress = new BigDecimal(projectJson.getDouble("progress")).multiply(new BigDecimal(100)).intValue();
+                        log.info("当前进度为,progress:{}",progress);
                         if (progress - mainProgress >= 10) {
                             mainProgress = progress;
                             Map<String, Object> params = new HashMap<>();
@@ -143,6 +144,7 @@ public class BuildSceneProgressServiceImpl implements IBuildSceneProgressService
 
                 @Override
                 public void onOverflow(WatchEvent<?> event, Path currentPath) {
+                    log.info("覆盖咯。。。。");
                 }
             });
             watchMonitor.start();