Skip to content

Commit

Permalink
Cleanup purge output
Browse files Browse the repository at this point in the history
  • Loading branch information
SimulPiscator committed Nov 4, 2023
1 parent d4b0f7b commit 759dc25
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions server/purgethread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit 759dc25

Please sign in to comment.