|
@@ -200,30 +200,30 @@ public class MDO0039Service extends MDO0039BaseModel implements ExecProcessFlow
|
|
DockerExe.getDockerLogs(pid,new ResultCallback.Adapter<Frame>() {
|
|
DockerExe.getDockerLogs(pid,new ResultCallback.Adapter<Frame>() {
|
|
@Override
|
|
@Override
|
|
public void onNext(Frame frame) {
|
|
public void onNext(Frame frame) {
|
|
-// if(con[0] <100){
|
|
|
|
-// line[0]+=new String(frame.getPayload());
|
|
|
|
-// con[0]++;
|
|
|
|
-// }else{
|
|
|
|
-//// LogService.addLog(pid, line[0]);
|
|
|
|
-// line[0]="";
|
|
|
|
-// con[0] =0;
|
|
|
|
-// }
|
|
|
|
-// LogService.addLog(pid, new String(frame.getPayload()));
|
|
|
|
-// System.out.print(new String(frame.getPayload()));
|
|
|
|
|
|
+ if(con[0] <100){
|
|
|
|
+ line[0]+=new String(frame.getPayload());
|
|
|
|
+ con[0]++;
|
|
|
|
+ }else{
|
|
|
|
+ LogService.addLog(pid, line[0]);
|
|
|
|
+ line[0]="";
|
|
|
|
+ con[0] =0;
|
|
|
|
+ }
|
|
|
|
+ LogService.addLog(pid, new String(frame.getPayload()));
|
|
|
|
+ System.out.print(new String(frame.getPayload()));
|
|
super.onNext(frame);
|
|
super.onNext(frame);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void onError(Throwable throwable) {
|
|
public void onError(Throwable throwable) {
|
|
System.err.println("日志获取失败");
|
|
System.err.println("日志获取失败");
|
|
-// LogService.addLog(pid, line[0]);
|
|
|
|
|
|
+ LogService.addLog(pid, line[0]);
|
|
throwable.printStackTrace();
|
|
throwable.printStackTrace();
|
|
super.onError(throwable);
|
|
super.onError(throwable);
|
|
}
|
|
}
|
|
@Override
|
|
@Override
|
|
public void onComplete() {
|
|
public void onComplete() {
|
|
System.out.println("日志获取完成");
|
|
System.out.println("日志获取完成");
|
|
-// LogService.addLog(pid, line[0]);
|
|
|
|
|
|
+ LogService.addLog(pid, line[0]);
|
|
super.onComplete();
|
|
super.onComplete();
|
|
}
|
|
}
|
|
});
|
|
});
|