aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2014-08-01 14:20:56 +1000
committerBrett Porter <brett@apache.org>2014-08-01 14:20:56 +1000
commit4ec9c4356f011964e9dde74e1eea9aa40f7c55be (patch)
treeae96fc678efaabaf59c2479c67a63ecddb68b00e
parentaf464ee039500b70f243158f4d3cb398bc89caca (diff)
downloadarchiva-4ec9c4356f011964e9dde74e1eea9aa40f7c55be.tar.gz
archiva-4ec9c4356f011964e9dde74e1eea9aa40f7c55be.zip
re-order test
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java
index f69d56627..dae631306 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java
@@ -170,6 +170,11 @@ public class DefaultRepositoriesService
@Override
public Boolean alreadyScanning( String repositoryId )
{
+ // check queue first to make sure it doesn't get dequeued between calls
+ if ( repositoryTaskScheduler.isProcessingRepositoryTask( repositoryId ) )
+ {
+ return true;
+ }
for ( RepositoryScannerInstance scan : repoScanner.getInProgressScans() )
{
if ( scan.getRepository().getId().equals( repositoryId ) )
@@ -177,7 +182,7 @@ public class DefaultRepositoriesService
return true;
}
}
- return repositoryTaskScheduler.isProcessingRepositoryTask( repositoryId );
+ return false;
}
@Override