Test for queued task size
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 16 Jul 2015 14:55:37 +0000 (10:55 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 16 Jul 2015 14:55:37 +0000 (10:55 -0400)
dsl/kernel-lttng-modules.seed.groovy

index e3ee3f0884901e5a7c9ec2566aba865c4c4dedba..b551e16ee3d72bff54c279acfadb517fa8422cd6 100644 (file)
@@ -288,12 +288,15 @@ hudson.model.Hudson.instance.nodes.each { node ->
 println "Nb of live kernel enabled build node "+ kernelEnabledNode
 
 def ongoingBuild = []
+def queueInstance = Jenkins.instance.queue
+
 
 while (toBuild.size() != 0) {
        if(ongoingBuild.size() <= (kernelEnabledNode.intdiv(2))) {
                def job = toBuild.pop()
                ongoingBuild.push(job.scheduleBuild2(0))
                println "\\t trigering" + HyperlinkNote.encodeTo('/' + job.url, job.fullDisplayName)
+               println "Debug: currenlty queued task" + queueInstance.items.size()
        } else {
                Thread.sleep(random.nextInt(120000))
                ongoingBuild.removeAll{ it.isCancelled() || it.isDone() }
This page took 0.025026 seconds and 4 git commands to generate.