From 7d8c43c9d3d8af2c358d3faeffd39af10bd5d0b1 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Thu, 22 Oct 2020 08:49:38 +0100 Subject: [PATCH] more logging --- .../main/groovy/com/muwire/core/hostcache/H2HostCache.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/groovy/com/muwire/core/hostcache/H2HostCache.groovy b/core/src/main/groovy/com/muwire/core/hostcache/H2HostCache.groovy index 352387c9..c83b181b 100644 --- a/core/src/main/groovy/com/muwire/core/hostcache/H2HostCache.groovy +++ b/core/src/main/groovy/com/muwire/core/hostcache/H2HostCache.groovy @@ -164,9 +164,9 @@ class H2HostCache extends HostCache { if (rows.size() < settings.hostProfileHistory) return - def lastTstamp = rows[rows.size() - 1].TSTAMP + def lastTstamp = rows[settings.hostProfileHistory - 1].TSTAMP sql.execute("delete from HOST_ATTEMPTS where DESTINATION=${d.toBase64()} and TSTAMP < $lastTstamp") - log.fine("deleted $sql.updateCount old attempts") + log.fine("deleted $sql.updateCount old attempts older than $lastTstamp") } @Override