|
@@ -10,6 +10,7 @@ import cn.hutool.http.HttpUtil;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
+import com.fdkankan.common.constant.ModelingBuildStatus;
|
|
import com.fdkankan.common.constant.SceneVersionType;
|
|
import com.fdkankan.common.constant.SceneVersionType;
|
|
import com.fdkankan.common.util.FileUtils;
|
|
import com.fdkankan.common.util.FileUtils;
|
|
import com.fdkankan.contro.entity.ScenePlus;
|
|
import com.fdkankan.contro.entity.ScenePlus;
|
|
@@ -63,7 +64,7 @@ public class BuildSceneProgressServiceImpl implements IBuildSceneProgressService
|
|
String title = scenePlus.getTitle();
|
|
String title = scenePlus.getTitle();
|
|
|
|
|
|
ExecutorService executor = ThreadUtil.newSingleExecutor();
|
|
ExecutorService executor = ThreadUtil.newSingleExecutor();
|
|
- CompletableFuture<Void> voidCompletableFuture = CompletableFuture.runAsync(() -> {
|
|
|
|
|
|
+ Future future = executor.submit(() -> {
|
|
String projectJsonPath = path.concat(File.separator).concat("project.json");
|
|
String projectJsonPath = path.concat(File.separator).concat("project.json");
|
|
File file = FileUtil.file(projectJsonPath);
|
|
File file = FileUtil.file(projectJsonPath);
|
|
WatchMonitor watchMonitor = WatchMonitor.create(file);
|
|
WatchMonitor watchMonitor = WatchMonitor.create(file);
|
|
@@ -144,15 +145,14 @@ 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();
|
|
- }, executor);
|
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
- voidCompletableFuture.get(2*24*60*60, TimeUnit.SECONDS);
|
|
|
|
|
|
+ future.get(2*24*60*60, TimeUnit.SECONDS);
|
|
} catch (InterruptedException e) {
|
|
} catch (InterruptedException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
} catch (ExecutionException e) {
|
|
} catch (ExecutionException e) {
|