|
@@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.fdkankan.common.constant.*;
|
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
|
import com.fdkankan.common.response.ResultData;
|
|
|
+import com.fdkankan.common.util.ComputerUtil;
|
|
|
import com.fdkankan.common.util.CreateObjUtil;
|
|
|
import com.fdkankan.common.util.FileMd5Util;
|
|
|
import com.fdkankan.common.util.FileUtil;
|
|
@@ -1000,16 +1001,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
String uploadJsonPath = target + File.separator + "results" + File.separator + "upload.json";
|
|
|
log.info("uploadJsonPath=" + uploadJsonPath);
|
|
|
//因为共享目录有延迟,这里循环检测算法是否计算完毕3次,每次隔五秒
|
|
|
- int checkTimes = 1;
|
|
|
- boolean exist = false;
|
|
|
- do {
|
|
|
- if(new File(uploadJsonPath).exists()){
|
|
|
- exist = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- Thread.sleep(5000);
|
|
|
- ++checkTimes;
|
|
|
- }while (checkTimes <= 3);
|
|
|
+ boolean exist = ComputerUtil.checkComputeCompleted(uploadJsonPath, 3, 5000);
|
|
|
if(!exist){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5042);
|
|
|
}
|