Move debug print and reduce thread sleep
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 16 Jul 2015 17:43:52 +0000 (13:43 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 16 Jul 2015 17:43:52 +0000 (13:43 -0400)
dsl/kernel-lttng-modules.seed.groovy

index af312c2fc63f1541a32d0b3fb9526fc46870c0c2..723b5e042765d1a6c2aea00f1c5d56f464db61a7 100644 (file)
@@ -301,14 +301,15 @@ while (toBuild.size() != 0) {
                it.task.name.startsWith(jobStartWithModule)
        }
 
-       if ((ongoingBuild.size() <= kernelEnabledNode) && (queuedTask.size() < limitQueue)) {
+       if ((ongoingBuild.size() <= kernelEnabledNode.intdiv(2)) && (queuedTask.size() < limitQueue)) {
                def job = toBuild.pop()
                ongoingBuild.push(job.scheduleBuild2(0))
-               println "Currently " + queuedTask.findAll{it.task.name.startsWith(jobStartWithModule)}.size() + " module jobs are queued"
-               println "Currently " + queuedTask.findAll{it.task.name.startsWith(jobStartWithKernel)}.size() + " kernel jobs are queued"
                println "\\t trigering " + HyperlinkNote.encodeTo('/' + job.url, job.fullDisplayName)
        } else {
-               Thread.sleep(random.nextInt(120000))
+               println "Currently " + ongoingBuild.size() + " build currently on execution. Limit: " + kernelEnabledNode.intdiv(2)
+               println "Currently " + queuedTask.findAll{it.task.name.startsWith(jobStartWithModule)}.size() + " module jobs are queued. Limit: " + limitQueue
+               println "Currently " + queuedTask.findAll{it.task.name.startsWith(jobStartWithKernel)}.size() + " kernel jobs are queued. Limit: " + limitQueue
+               Thread.sleep(random.nextInt(60000))
                ongoingBuild.removeAll{ it.isCancelled() || it.isDone() }
        }
 }
This page took 0.026807 seconds and 4 git commands to generate.