continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r693095 - in /continuum/branches/continuum-transient-state: continuum-api/src/main/java/org/apache/continuum/taskqueue/manager/ continuum-core/src/main/java/org/apache/continuum/taskqueue/manager/ continuum-core/src/main/java/org/apache/mav...
Date Mon, 08 Sep 2008 13:51:44 GMT
Author: ctan
Date: Mon Sep  8 06:51:41 2008
New Revision: 693095

URL: http://svn.apache.org/viewvc?rev=693095&view=rev
Log:
should not cancel current checkout task

Modified:
    continuum/branches/continuum-transient-state/continuum-api/src/main/java/org/apache/continuum/taskqueue/manager/TaskQueueManager.java
    continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/continuum/taskqueue/manager/DefaultTaskQueueManager.java
    continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java

Modified: continuum/branches/continuum-transient-state/continuum-api/src/main/java/org/apache/continuum/taskqueue/manager/TaskQueueManager.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-api/src/main/java/org/apache/continuum/taskqueue/manager/TaskQueueManager.java?rev=693095&r1=693094&r2=693095&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-api/src/main/java/org/apache/continuum/taskqueue/manager/TaskQueueManager.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-api/src/main/java/org/apache/continuum/taskqueue/manager/TaskQueueManager.java
Mon Sep  8 06:51:41 2008
@@ -18,9 +18,6 @@
 
     void cancelBuildTask( int projectId )
         throws TaskQueueManagerException;
-    
-    void cancelCheckoutTask( int projectId )
-        throws TaskQueueManagerException;
 
     TaskQueue getBuildQueue();
 

Modified: continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/continuum/taskqueue/manager/DefaultTaskQueueManager.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/continuum/taskqueue/manager/DefaultTaskQueueManager.java?rev=693095&r1=693094&r2=693095&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/continuum/taskqueue/manager/DefaultTaskQueueManager.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/continuum/taskqueue/manager/DefaultTaskQueueManager.java
Mon Sep  8 06:51:41 2008
@@ -10,7 +10,6 @@
 import org.apache.continuum.dao.ProjectDao;
 import org.apache.continuum.model.repository.LocalRepository;
 import org.apache.continuum.model.repository.RepositoryPurgeConfiguration;
-import org.apache.continuum.purge.ContinuumPurgeManagerException;
 import org.apache.continuum.purge.PurgeConfigurationService;
 import org.apache.continuum.purge.task.PurgeTask;
 import org.apache.maven.continuum.buildqueue.BuildProjectTask;
@@ -34,7 +33,7 @@
 import org.codehaus.plexus.util.StringUtils;
 
 /**
- * @author Maria Catherine Tan
+ * @author <a href="mailto:ctan@apache.org">Maria Catherine Tan</a>
  * @plexus.component role="org.apache.continuum.taskqueue.manager.TaskQueueManager" role-hint="default"
  */
 public class DefaultTaskQueueManager
@@ -106,21 +105,6 @@
         }
     }
     
-    public void cancelCheckoutTask( int projectId )
-        throws TaskQueueManagerException
-    {
-        Task currentTask = getCheckoutTaskQueueExecutor().getCurrentTask();
-
-        if ( currentTask instanceof CheckOutTask )
-        {
-            if ( ( (CheckOutTask) currentTask ).getProjectId() == projectId )
-            {
-                getLogger().info( "Cancelling task for project " + projectId );
-                getCheckoutTaskQueueExecutor().cancelTask( currentTask );
-            }
-        }    
-    }
-    
     public TaskQueue getBuildQueue()
     {
         return buildQueue;

Modified: continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=693095&r1=693094&r2=693095&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Mon Sep  8 06:51:41 2008
@@ -1226,8 +1226,6 @@
             {
                 taskQueueManager.removeProjectFromCheckoutQueue( projectId );
             }
-
-            taskQueueManager.cancelCheckoutTask( projectId );
         }
         catch ( TaskQueueManagerException e )
         {
@@ -1259,8 +1257,6 @@
             {
                 return;
             }
-            
-            taskQueueManager.cancelCheckoutTask( projectId );
         }
         catch ( TaskQueueManagerException e )
         {
@@ -1326,7 +1322,7 @@
             if ( project.getState() != ContinuumProjectState.NEW &&
                 project.getState() != ContinuumProjectState.CHECKEDOUT &&
                 project.getState() != ContinuumProjectState.OK && project.getState()
!= ContinuumProjectState.FAILED &&
-                project.getState() != ContinuumProjectState.ERROR )
+                project.getState() != ContinuumProjectState.ERROR && project.getState()
!= ContinuumProjectState.CANCELLED )
             {
                 ContinuumBuildExecutor executor = executorManager.getBuildExecutor( project.getExecutorId()
);
     
@@ -1385,7 +1381,7 @@
         }
     }
 
-
+/*
     private synchronized void buildProject( Project project, int buildDefinitionId, int trigger,
boolean checkQueues )
         throws ContinuumException
     {
@@ -1472,7 +1468,7 @@
             throw logAndCreateException( "Error while creating enqueuing object.", e );
         }
     }
-
+*/
     public BuildResult getBuildResult( int buildId )
         throws ContinuumException
     {
@@ -3552,8 +3548,6 @@
                 {
                     taskQueueManager.removeProjectFromCheckoutQueue( projectId );
                 }
-                
-                taskQueueManager.cancelCheckoutTask( projectId );
             }
             catch ( TaskQueueManagerException e )
             {
@@ -3639,8 +3633,6 @@
                 {
                     taskQueueManager.removeProjectFromCheckoutQueue( projectId );
                 }
-                
-                taskQueueManager.cancelCheckoutTask( projectId );
             }
             catch ( TaskQueueManagerException e )
             {

Modified: continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java?rev=693095&r1=693094&r2=693095&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java
Mon Sep  8 06:51:41 2008
@@ -158,17 +158,11 @@
         catch ( ScmException e )
         {
             result = new ScmResult();
+            
+            result.setSuccess( false );
+
+            result.setException( ContinuumUtils.throwableMessagesToString( e ) );
 
-            if ( e.getCause() instanceof InterruptedException )
-            {
-                result.setSuccess( true );
-            }
-            else
-            {
-                result.setSuccess( false );
-    
-                result.setException( ContinuumUtils.throwableMessagesToString( e ) );
-            }
             getLogger().error( e.getMessage(), e );
         }
         catch ( Throwable t )



Mime
View raw message