From 759dc25b54f50704a9d203c18a2cf2d26cc5d70f Mon Sep 17 00:00:00 2001 From: SimulPiscator Date: Sat, 4 Nov 2023 09:53:27 +0100 Subject: [PATCH] Cleanup purge output --- server/purgethread.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/purgethread.cpp b/server/purgethread.cpp index 8087f00..cc1c03c 100644 --- a/server/purgethread.cpp +++ b/server/purgethread.cpp @@ -58,9 +58,11 @@ void PurgeThread::Private::terminate() void PurgeThread::Private::threadFunc() { while (interruptibleSleep(mSleepDuration)) { - std::clog << "purging jobs with timeout of " << mMaxTime << "seconds"; - for (const auto& entry : *mpScanners) - entry.pScanner->purgeJobs(mMaxTime); + for (const auto& entry : *mpScanners) { + int count = entry.pScanner->purgeJobs(mMaxTime); + if (count > 0) + std::clog << "purged " << count << " jobs" << std::endl; + } } }