|
@@ -343,7 +343,7 @@ public class D00008Service extends D00008BaseModel implements ExecProcessFlow {
|
|
CompletableFuture<Void> cf = CompletableFuture.supplyAsync(()->{
|
|
CompletableFuture<Void> cf = CompletableFuture.supplyAsync(()->{
|
|
try {
|
|
try {
|
|
ProcessBuilder processBuilder = new ProcessBuilder(
|
|
ProcessBuilder processBuilder = new ProcessBuilder(
|
|
- "docker run --name " +
|
|
|
|
|
|
+ "docker"," run","--name " +
|
|
aid +jid+
|
|
aid +jid+
|
|
" -it -v /home/disaster/zhty/:/home/disaster/zhty/ " +
|
|
" -it -v /home/disaster/zhty/:/home/disaster/zhty/ " +
|
|
"-v /cephfs/disaster/:/cephfs/disaster/ " +
|
|
"-v /cephfs/disaster/:/cephfs/disaster/ " +
|
|
@@ -380,14 +380,16 @@ public class D00008Service extends D00008BaseModel implements ExecProcessFlow {
|
|
LogService.addLog(aid,jid,"Water",line);
|
|
LogService.addLog(aid,jid,"Water",line);
|
|
System.out.println(line);
|
|
System.out.println(line);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ // 等待命令执行完成
|
|
|
|
+ int exitCode = process.waitFor();
|
|
|
|
+ System.out.println("\nExited with code: " + exitCode);
|
|
|
|
|
|
saveMonitorValue(aid,jid);
|
|
saveMonitorValue(aid,jid);
|
|
//路径保存
|
|
//路径保存
|
|
saveWayValue(aid,jid);
|
|
saveWayValue(aid,jid);
|
|
JobSucces(jid);
|
|
JobSucces(jid);
|
|
LogService.addLog(aid,jid,"Water","求解——————————————————成功");
|
|
LogService.addLog(aid,jid,"Water","求解——————————————————成功");
|
|
- } catch (IOException | BusinessException e) {
|
|
|
|
|
|
+ } catch (IOException | BusinessException | InterruptedException e) {
|
|
LogService.addLog(aid,jid,"Water","求解——————————————————失败");
|
|
LogService.addLog(aid,jid,"Water","求解——————————————————失败");
|
|
JobError(jid);
|
|
JobError(jid);
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|