提交 e9def49a 编写于 作者: P pgweiss

If a project is not set for concurrent builds and there is more than one job

in the queue (e.g. if the build is parameterized), then don't make more than
one of them runnable.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@21365 71c3de6d-444a-0410-be80-ed276b4c234a
上级 2e1a591e
......@@ -29,6 +29,7 @@ import hudson.ExtensionPoint;
import hudson.Util;
import hudson.XmlFile;
import hudson.remoting.AsyncFutureImpl;
import hudson.model.AbstractProject;
import hudson.model.Node.Mode;
import hudson.model.ParametersAction;
import hudson.triggers.SafeTimerTask;
......@@ -864,6 +865,14 @@ public class Queue extends ResourceController implements Saveable {
while (itr.hasNext()) {
BlockedItem p = itr.next();
if (!isBuildBlocked(p.task)) {
// Make sure that we don't make more than one item buildable unless the
// project can handle concurrent builds
if (p.task instanceof AbstractProject<?,?>) {
AbstractProject<?,?> proj = (AbstractProject<?,?>) p.task;
if (!proj.isConcurrentBuild() && buildables.containsKey(p.task)) {
continue;
}
}
// ready to be executed
LOGGER.fine(p.task.getFullDisplayName() + " no longer blocked");
itr.remove();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册