continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1156500 - /continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
Date Thu, 11 Aug 2011 06:22:13 GMT
Author: ctan
Date: Thu Aug 11 06:22:12 2011
New Revision: 1156500

URL: http://svn.apache.org/viewvc?rev=1156500&view=rev
Log:
[CONTINUUM-2648] include number of projects when in current prepare build or in prepare build
queue

Modified:
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java?rev=1156500&r1=1156499&r2=1156500&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
(original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
Thu Aug 11 06:22:12 2011
@@ -469,14 +469,23 @@ public class ContinuumBuildAgentServiceI
                 size++;
             }
 
-            if ( buildAgentTaskQueueManager.getCurrentProjectInPrepareBuild() != null )
+            PrepareBuildProjectsTask currentPrepareBuild = buildAgentTaskQueueManager.getCurrentProjectInPrepareBuild();
+
+            if ( currentPrepareBuild != null )
             {
-                size++;
+                // need to get actual number of projects.
+                size = size + currentPrepareBuild.getBuildContexts().size();
             }
 
             size = size + buildAgentTaskQueueManager.getProjectsInBuildQueue().size();
 
-            size = size + buildAgentTaskQueueManager.getProjectsInPrepareBuildQueue().size();
+            for ( PrepareBuildProjectsTask prepareBuildTask : buildAgentTaskQueueManager.getProjectsInPrepareBuildQueue()
)
+            {
+                if ( prepareBuildTask != null )
+                {
+                    size = size + prepareBuildTask.getBuildContexts().size();
+                }
+            }
         }
         catch ( TaskQueueManagerException e )
         {



Mime
View raw message