try to fix purging of old entries within the same day

pull/53/head
Zlatin Balevsky 2020-10-22 09:34:53 +01:00
parent aa3cf2cf84
commit 4e6c90b98c
No known key found for this signature in database
GPG Key ID: A72832072D525E41
1 changed files with 2 additions and 1 deletions

View File

@ -164,7 +164,8 @@ class H2HostCache extends HostCache {
if (rows.size() < settings.hostProfileHistory)
return
def lastTstamp = rows[settings.hostProfileHistory - 1].TSTAMP
def lastTstamp = rows[settings.hostProfileHistory - 1].TSTAMP
lastTimestamp = SDF.format(new Date(lastTstamp.getTime()))
sql.execute("delete from HOST_ATTEMPTS where DESTINATION=${d.toBase64()} and TSTAMP < $lastTstamp")
log.fine("deleted $sql.updateCount old attempts older than $lastTstamp")
}