diff options
author | Olivier Lamy <olamy@apache.org> | 2011-11-17 22:50:21 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2011-11-17 22:50:21 +0000 |
commit | 67b0a5a62a072fb991039d6fef9a5ba34d7c77a2 (patch) | |
tree | f5f5f703f4ffbf16ef1f0cd7ae8352b1cd3379d8 /archiva-modules/archiva-scheduler/archiva-scheduler-indexing | |
parent | 83dfa790b36dfb71716859add23ee8115a22ef2c (diff) | |
download | archiva-67b0a5a62a072fb991039d6fef9a5ba34d7c77a2.tar.gz archiva-67b0a5a62a072fb991039d6fef9a5ba34d7c77a2.zip |
[MRM-1560] Add the possibility to schedule retrieve remote indexes when application startup
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1203406 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-scheduler/archiva-scheduler-indexing')
-rw-r--r-- | archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DefaultDownloadRemoteIndexScheduler.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DefaultDownloadRemoteIndexScheduler.java b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DefaultDownloadRemoteIndexScheduler.java index b00332171..9714dcfbe 100644 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DefaultDownloadRemoteIndexScheduler.java +++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DefaultDownloadRemoteIndexScheduler.java @@ -193,6 +193,15 @@ public class DefaultDownloadRemoteIndexScheduler taskScheduler.schedule( new DownloadRemoteIndexTask( downloadRemoteIndexTaskRequest, this.runningRemoteDownloadIds ), new CronTrigger( remoteRepository.getCronExpression() ) ); + + if ( remoteRepository.isDownloadRemoteIndexOnStartup() ) + { + log.info( + "remote repository {} configured with downloadRemoteIndexOnStartup schedule now a download" ); + taskScheduler.schedule( + new DownloadRemoteIndexTask( downloadRemoteIndexTaskRequest, this.runningRemoteDownloadIds ), + new Date() ); + } } } |