|
@@ -238,12 +238,6 @@ public class RabbitMqListener {
|
|
|
return ModelingBuildStatus.SUCCESS;
|
|
|
}
|
|
|
|
|
|
- /*
|
|
|
- 1、判断是否计算过资源,若计算过删除缓存, 如果caches中存在_images文件或者目录,就删除掉,否则就删除除了images以外的所有文件和目录
|
|
|
- 2、删除上一次计算出来的result目录
|
|
|
- */
|
|
|
- this.deleteCachesAndResult(path,message);
|
|
|
-
|
|
|
Map<String, String> dataMap = buildService.getTypeString(cameraType, algorithm, resolution,dataJson);
|
|
|
|
|
|
String splitType = dataMap.get("splitType");
|
|
@@ -355,22 +349,4 @@ public class RabbitMqListener {
|
|
|
buildResult.setBuildContext(message.getBuildContext());
|
|
|
rabbitMqProducer.sendByWorkQueue(buildSceneResult.getResultQueueName(),buildResult);
|
|
|
}
|
|
|
-
|
|
|
- private void deleteCachesAndResult(String path,BuildSceneCallMessage message){
|
|
|
- //判断是否计算过资源,若计算过删除缓存, 如果caches中存在_images文件或者目录,就删除掉,否则就删除除了images以外的所有文件和目录
|
|
|
- File caches = new File(path + File.separator + "caches");
|
|
|
- if (caches.exists()) {
|
|
|
- FileUtils.deleteDirectory(path + File.separator + "caches");
|
|
|
- }
|
|
|
- //删除上一次计算出来的result目录
|
|
|
- if (new File(path + File.separator + "results").exists()) {
|
|
|
- FileUtils.delAllFile(path + File.separator + "results");
|
|
|
- }
|
|
|
- //删除点位数据
|
|
|
- if (!ObjectUtils.isEmpty(message.getExt()) && message.getExt().containsKey("deleteExtras") && (Boolean) message.getExt().get("deleteExtras")
|
|
|
- && new File(path + File.separator + "extras").exists()) {
|
|
|
- FileUtils.delAllFile(path + File.separator + "extras");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
}
|