Yes I did a check in allow concurrent execution.
Now when I run mvn clean hpi:run it starts the jobs in parallel on the
available executors, but its spawns jobs infinitely and the text: XXXX Done
in: " + object.getTime() is never printed. And I have not even pressed the
build button.
Why do I get something that seems like an infinite loop?
Here is my code based on your script:
List<Future<?>> futures = new ArrayList<Future<?>>();
for (int i = 0; i < 5; i++) {
System.out.println("Running: " + i + " out off: " + executors);
try {
QueueTaskFuture<?> scheduleBuild2 =
build.getProject().scheduleBuild2(0, new Cause.UserCause(),
parametersAction);
futures.add((Future) scheduleBuild2);
} catch (Exception e) {
throw new AbortException(e.getMessage());
}
}
for (Future<?> future : futures) {
AbstractBuild<?, ?> object = (AbstractBuild<?, ?>) future.get();
System.out.println("XXXX Done in: " + object.getTime());
}
On Sunday, March 9, 2014 11:23:37 PM UTC+1, Daniel Beck wrote:
>
> Since you seem to be triggering multiple builds of the same project, did
> you enable the project for parallel execution of multiple builds?
>
> On 09.03.2014, at 23:21, Daniel Beck <[email protected] <javascript:>>
> wrote:
>
> > If you have the executors, the builds should run in parallel
>
>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.