Build stuck in queue - Custom code

I've implemented some custom code that distributes builds to multiple agents based on an external trigger. However when i place the builds on the queue for each agent available the run sequentially, not in simultaneously

here is what I'm doing code wise:
assumptions: 2 Agents: agentA & agentB both are identical on different machines

+
SBuildType myRunType = createRunType();
List]]> agents = getAgents();

for (SBuildAgent agent : agents) {
myRunType.addToQueue(agent, "MyConfiguredBuild");
}
+

The code completes without error and i see AgentA running the MyConfiguredBuild, while MyConfiguredBuild is also queued up on AgentB. AgentB is idle. When AgentA completes MyConfiguredBuild only then does AgentB become active and run the MyConfiguredBuild build.

Any ideas as to why this is occurring?

Thanks

3 comments

Do you have 0 entered as the value for Limit the number of simultaneously running builds (0 - unlimited) on the General Settings tab of the Build Configuration?

0

I'm not sure.......i create the build dynamically. What is the default value if it is not explicitly set?

0

I believe that is the problem......it gets set to 1

Thanks for that catch.

0

Please sign in to leave a comment.