Don't immediately call .get(), instead assign the Future returned from scheduleBuild2 to a variable. Only .get() once you're willing to wait for the build to complete.
On 09.03.2014, at 22:27, dev123 <[email protected]> wrote: > In a jenkins plugin I am writing I need to run 5 jobs in parallel. Currently > I do (sequentially): > > for (int i = 0; i < 4; i++) { > try { > build = project.scheduleBuild2(0, new Cause.UserCause(), > myActions[i]).get(); > } catch (Exception e) { > throw new AbortException(e.getMessage()); > } > } > > How do I trigger these jobs to run in parallel - each one on a separate > executor? > > > -- > 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. -- 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.
