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();
}
tempSize = taskQueue.getQueueSnapshot().size();
if ( taskQueueExecutor.getCurrentTask() != null )
{
tempSize++;
}