From b72d66910957d6dbe9304df092f80848897b5203 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 7 Feb 2013 23:44:28 +0000 Subject: [PATCH] better logging when cleaning temp group index git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1443793 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva/indexer/merger/TemporaryGroupIndex.java | 10 ++++++++++ .../indexer/merger/TemporaryGroupIndexCleaner.java | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndex.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndex.java index 06bb69e68..9152160b0 100644 --- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndex.java +++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndex.java @@ -76,6 +76,16 @@ public class TemporaryGroupIndex return this; } + public String getGroupId() + { + return groupId; + } + + public void setGroupId( String groupId ) + { + this.groupId = groupId; + } + @Override public int hashCode() { diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndexCleaner.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndexCleaner.java index 8d0cedaeb..e34b24991 100644 --- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndexCleaner.java +++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndexCleaner.java @@ -54,12 +54,13 @@ public class TemporaryGroupIndexCleaner @Scheduled(fixedDelay = 900000) public void cleanTemporaryIndex() { - log.info( "cleanTemporaryIndex" ); + for ( TemporaryGroupIndex temporaryGroupIndex : indexMerger.getTemporaryGroupIndexes() ) { // cleanup files older than the ttl if ( new Date().getTime() - temporaryGroupIndex.getCreationTime() > indexMerger.getGroupMergedIndexTtl() ) { + log.info( "cleanTemporaryIndex for groupId {}", temporaryGroupIndex.getGroupId() ); indexMerger.cleanTemporaryGroupIndex( temporaryGroupIndex ); } -- 2.39.5