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