if ( count <= allowedBuilds )
{
OverallBuildQueue overallBuildQueue = overallBuildQueues.get( buildQueue.getId() );
if ( overallBuildQueue != null )
{
TaskQueue taskQueue = null;
TaskQueueExecutor taskQueueExecutor = null;
int tempSize = 0;
if ( typeOfQueue == BUILD_QUEUE )
{
taskQueue = overallBuildQueue.getBuildQueue();
taskQueueExecutor = overallBuildQueue.getBuildTaskQueueExecutor();
}
else if ( typeOfQueue == CHECKOUT_QUEUE )
{
taskQueue = overallBuildQueue.getCheckoutQueue();
taskQueueExecutor = overallBuildQueue.getCheckoutTaskQueueExecutor();
}
else if ( typeOfQueue == PREPARE_BUILD_QUEUE )
{
taskQueue = overallBuildQueue.getPrepareBuildQueue();
taskQueueExecutor = overallBuildQueue.getPrepareBuildTaskQueueExecutor();
}
tempSize = taskQueue.getQueueSnapshot().size();
if ( taskQueueExecutor.getCurrentTask() != null )
{
tempSize++;
}