summaryrefslogtreecommitdiff
path: root/src/ingestor.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan.goodliffe@octal.co.uk>2026-06-08 12:31:07 +0100
committerDan Goodliffe <dan.goodliffe@octal.co.uk>2026-06-08 12:31:07 +0100
commitee9517e452376bc4963aa3a43ca90ebb9d710b85 (patch)
tree8830e147a173d64995c7e3e0666e1782c226a5af /src/ingestor.cpp
parentaa8f64a3e140e74a1f8d0074b606dd1f8560ad0a (diff)
downloadwebstat-ee9517e452376bc4963aa3a43ca90ebb9d710b85.tar.bz2
webstat-ee9517e452376bc4963aa3a43ca90ebb9d710b85.tar.xz
webstat-ee9517e452376bc4963aa3a43ca90ebb9d710b85.zip
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.
Diffstat (limited to 'src/ingestor.cpp')
-rw-r--r--src/ingestor.cpp3
1 files changed, 1 insertions, 2 deletions
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) {