提交 db27f01a 编写于 作者: C Christoph Kutzinski

Merge pull request #795 from ndeloof/master

simplify RestartListener.Default using getBusyExecutors()
......@@ -51,8 +51,7 @@ public abstract class RestartListener implements ExtensionPoint {
public static class Default extends RestartListener {
@Override
public boolean isReadyToRestart() throws IOException, InterruptedException {
Jenkins h = Jenkins.getInstance();
return h.overallLoad.computeTotalExecutors() <= h.overallLoad.computeIdleExecutors();
return new ComputerSet().getBusyExecutors() != 0;
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册