diff options
| author | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-05-13 15:49:10 +0100 |
|---|---|---|
| committer | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-05-13 15:49:10 +0100 |
| commit | 29f458117184af5b1507cac01b48b41bfbad568a (patch) | |
| tree | f392b1cafc8d7a8239166c958ecdd55edc28d6a5 | |
| parent | 3e7a1ce999b2223b321573de19cef840021f77f5 (diff) | |
| download | webstat-29f458117184af5b1507cac01b48b41bfbad568a.tar.bz2 webstat-29f458117184af5b1507cac01b48b41bfbad568a.tar.xz webstat-29f458117184af5b1507cac01b48b41bfbad568a.zip | |
Check terminated flag in jobPurgeOldLogswebstat-0.5.1
It's not critical to run to completion during shutdown, we can pick up
where we left off on the next run. This will allow us to bail out
instead of holding up the shutdown process.
| -rw-r--r-- | src/ingestor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ingestor.cpp b/src/ingestor.cpp index e2c6f02..3e6e307 100644 --- a/src/ingestor.cpp +++ b/src/ingestor.cpp @@ -542,7 +542,7 @@ namespace WebStat { purge->bindParam(0, std::format("{} days", settings.purgeDaysToKeep)); purge->bindParam(1, settings.purgeDeleteMax); unsigned int purgedTotal {}; - while (stopAt > Job::LastRunTime::clock::now()) { + while (!terminated && stopAt > Job::LastRunTime::clock::now()) { const auto purged = purge->execute(); purgedTotal += purged; if (purged < settings.purgeDeleteMax) { |
