re-order test

This commit is contained in:
Brett Porter 2014-08-01 14:20:56 +10:00
parent af464ee039
commit 4ec9c4356f
1 changed files with 6 additions and 1 deletions

View File

@ -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