|
@@ -27,6 +27,8 @@ import com.miniframe.modo.temp.problem.WorkflowVo;
|
|
import com.miniframe.tools.XIFileUtils;
|
|
import com.miniframe.tools.XIFileUtils;
|
|
import com.miniframe.tools.XiJsonUtil;
|
|
import com.miniframe.tools.XiJsonUtil;
|
|
import com.miniframe.tools.docker.DockerExe;
|
|
import com.miniframe.tools.docker.DockerExe;
|
|
|
|
+import com.miniframe.tools.file.FileMonitor;
|
|
|
|
+import com.miniframe.tools.file.SurromdaoFileListener;
|
|
import freemarker.template.Configuration;
|
|
import freemarker.template.Configuration;
|
|
import freemarker.template.Template;
|
|
import freemarker.template.Template;
|
|
import lombok.SneakyThrows;
|
|
import lombok.SneakyThrows;
|
|
@@ -117,7 +119,17 @@ public class MDO0039Service extends MDO0039BaseModel implements ExecProcessFlow
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- private void run2(String pid) {
|
|
|
|
|
|
+ private void run2(String pid) throws Exception {
|
|
|
|
+ MdoProComvalMapper comvalDao =UtilTools.getBean(MdoProComvalMapper.class);
|
|
|
|
+ MdoProComvalSQLBuilder sb =new MdoProComvalSQLBuilder();
|
|
|
|
+ MdoProComvalSQLBuilder.Criteria sc = sb.createCriteria();
|
|
|
|
+ sc.andPidEqualTo(pid);
|
|
|
|
+ comvalDao.deleteByExample(sb);
|
|
|
|
+ FileMonitor fileMonitor = new FileMonitor(1000);
|
|
|
|
+ SurromdaoFileListener t= new SurromdaoFileListener(pid);
|
|
|
|
+ fileMonitor.monitor("/cephfs/mdo/"+pid+"/in/myid_0", t);
|
|
|
|
+ fileMonitor.start();
|
|
|
|
+
|
|
LogService.addLog(pid,"求解——————————————————开始");
|
|
LogService.addLog(pid,"求解——————————————————开始");
|
|
DockerExe.stopDocker(pid);
|
|
DockerExe.stopDocker(pid);
|
|
DockerExe.runMdo2(pid);
|
|
DockerExe.runMdo2(pid);
|
|
@@ -143,12 +155,18 @@ public class MDO0039Service extends MDO0039BaseModel implements ExecProcessFlow
|
|
super.onComplete();
|
|
super.onComplete();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+
|
|
LogService.addLog(pid,"求解——————————————————成功");
|
|
LogService.addLog(pid,"求解——————————————————成功");
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
LogService.addLog(pid,"求解——————————————————失败");
|
|
LogService.addLog(pid,"求解——————————————————失败");
|
|
-
|
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
+ try {
|
|
|
|
+ fileMonitor.stop();
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
return null;
|
|
return null;
|
|
});
|
|
});
|
|
}
|
|
}
|