From ee9517e452376bc4963aa3a43ca90ebb9d710b85 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 8 Jun 2026 12:31:07 +0100 Subject: Remove the purge time limit This is a background job, has been for a while, so we can sanely allow it to run for as long as is required. --- src/ingestor.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/ingestor.cpp') diff --git a/src/ingestor.cpp b/src/ingestor.cpp index d15940c..16638eb 100644 --- a/src/ingestor.cpp +++ b/src/ingestor.cpp @@ -586,12 +586,11 @@ namespace WebStat { Ingestor::jobPurgeOldLogs() { auto dbconn = dbpool->get(); - const auto stopAt = Job::LastRunTime::clock::now() + settings.purgeDeleteMaxTime; const auto purge = dbconn->modify(SQL::ACCESS_LOG_PURGE_OLD, SQL::ACCESS_LOG_PURGE_OLD_OPTS); purge->bindParam(0, std::format("{} days", settings.purgeDaysToKeep)); purge->bindParam(1, settings.purgeDeleteMax); unsigned int purgedTotal {}; - while (!terminated && stopAt > Job::LastRunTime::clock::now()) { + while (!terminated) { const auto purged = purge->execute(); purgedTotal += purged; if (purged < settings.purgeDeleteMax) { -- cgit v1.3