diff options
| author | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-04-23 10:11:13 +0100 |
|---|---|---|
| committer | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-04-23 10:11:13 +0100 |
| commit | 7c59f2b66284b5b561c5368a0c834640ae0e611e (patch) | |
| tree | 52283c0147c33317e0683638ab88ae1828a91b20 /src/ingestor.cpp | |
| parent | 7a66f1241f4a6ec570a5c41490ee3698eeeaf66e (diff) | |
| download | webstat-7c59f2b66284b5b561c5368a0c834640ae0e611e.tar.bz2 webstat-7c59f2b66284b5b561c5368a0c834640ae0e611e.tar.xz webstat-7c59f2b66284b5b561c5368a0c834640ae0e611e.zip | |
Add BRIN index to access_log.request_time and improve purge
Purge is now fully request_time based and not hacked around id ranges.
Diffstat (limited to 'src/ingestor.cpp')
| -rw-r--r-- | src/ingestor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ingestor.cpp b/src/ingestor.cpp index cc5270f..c41454f 100644 --- a/src/ingestor.cpp +++ b/src/ingestor.cpp @@ -439,8 +439,8 @@ namespace WebStat { 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, settings.purgeDeleteMax); - purge->bindParam(1, std::format("{} days", settings.purgeDaysToKeep)); + purge->bindParam(0, std::format("{} days", settings.purgeDaysToKeep)); + purge->bindParam(1, settings.purgeDeleteMax); unsigned int purgedTotal {}; while (stopAt > Job::LastRunTime::clock::now()) { const auto purged = purge->execute(); |
