提交 5d91ed77 编写于 作者: J Jesse Glick

Merge branch 'JENKINS-20965' of github.com:christ66/jenkins

...@@ -1363,10 +1363,16 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run ...@@ -1363,10 +1363,16 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
public void writeWholeLogTo(OutputStream out) throws IOException, InterruptedException { public void writeWholeLogTo(OutputStream out) throws IOException, InterruptedException {
long pos = 0; long pos = 0;
AnnotatedLargeText logText; AnnotatedLargeText logText;
do { logText = getLogText();
pos = logText.writeLogTo(pos, out);
while (!logText.isComplete()) {
// Instead of us hitting the log file as many times as possible, instead we get the information once every
// second to avoid CPU usage getting very high.
Thread.sleep(1000);
logText = getLogText(); logText = getLogText();
pos = logText.writeLogTo(pos, out); pos = logText.writeLogTo(pos, out);
} while (!logText.isComplete()); }
} }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册