修改:hpc手动模式优化

This commit is contained in:
yangyang01000846
2026-01-20 20:25:37 +08:00
parent d6f602d6d6
commit 0a984643ed
2 changed files with 4 additions and 21 deletions

View File

@@ -196,9 +196,9 @@ public class HpcHandler implements ExecutionHandler<Map<String, Object>,HPCExecu
if (Objects.equals(executeMode,FlowableConfig.EXECUTE_MODE_MANUAL)) {
List<String> masterFilePaths = getFileListFromMap(params, "masterFileRegularStr");
List<String> inPutFilePaths = getFileListFromMap(params, "inputFilesRegularStr");
if(CollectionUtils.isEmpty(masterFilePaths)||CollectionUtils.isEmpty(inPutFilePaths)){
if(CollectionUtils.isEmpty(masterFilePaths)){
CoreLogger.warn("hpc executeMode manual,filepath illegal");
throw new RuntimeException("hpc executeMode manual,filepath illegal");
throw new RuntimeException("手动模式求解文件不能为空");
}
submitHpcTaskRemoteReq.setManualMasterFilepaths(masterFilePaths);
submitHpcTaskRemoteReq.setManualInputFilePaths(inPutFilePaths);

View File

@@ -83,7 +83,7 @@ public class TaskAdapter implements ITaskFeignClient {
finalInputFilePaths.add(FLOWABLE_SIMULATION_BASEDIR+inputFilePath);
}
// 本地从文件
submitHpcTaskReq.setInputFilePaths(inputFilePaths);
submitHpcTaskReq.setInputFilePaths(finalInputFilePaths);
log.info("getSimulationFile 手动主文件:{},从文件:{}",masterFilepath,JSONObject.toJSONString(finalInputFilePaths));
}
// 自动
@@ -108,24 +108,7 @@ public class TaskAdapter implements ITaskFeignClient {
masterFilepath=masterFilePathAtomic.get();
// 本地主文件
submitHpcTaskReq.setMasterFilePath(masterFilepath);
}
try {
// MultipartFile masterMultipartFile = FilesUtil.toMultipartFile(masterFilepath);
// submitHpcTaskReq.setMasterFile(masterMultipartFile);
if(CollectionUtils.isNotEmpty(inputFilePaths)){
// 本地从文件
submitHpcTaskReq.setInputFilePaths(inputFilePaths);
// List<MultipartFile> inputFiles = new ArrayList<>();
// for (String inputFilePath : inputFilePaths) {
// MultipartFile inputFile = FilesUtil.toMultipartFile(inputFilePath);
// inputFiles.add(inputFile);
// }
// submitHpcTaskReq.setInputFiles(inputFiles);
}
} catch (Exception e) {
log.error("getSimulationFile error",e);
throw new RuntimeException("求解文件处理失败"+e.getMessage());
submitHpcTaskReq.setInputFilePaths(inputFilePaths);
}
}