+ // Throttle the build with both the number of current parent task and queued
+ // task.Look for both kernel and downstream module from previous kernel.
+ def queuedTask = q.getItems().findAll {
+ it.task.getParent().name.startsWith(jobStartWithKernel) ||
+ it.task.getParent().name.startsWith(jobStartWithModule)
+ }
+
+ if ((ongoingBuild.size() <= kernelEnabledNode.intdiv(2)) && (queuedTask.size() < limitQueue)) {