From 5aa9cca0d2ff25c541d7df3b63519c28eb75b656 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 2 Oct 2025 23:42:52 +0100 Subject: Add point to execute scheduled jobs when idle --- src/ingestor.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ingestor.hpp') diff --git a/src/ingestor.hpp b/src/ingestor.hpp index 42c6699..afd4a0f 100644 --- a/src/ingestor.hpp +++ b/src/ingestor.hpp @@ -13,12 +13,16 @@ #include namespace WebStat { + using namespace std::chrono; + using namespace std::chrono_literals; + struct IngestorSettings : Settings { std::string dbConnStr = "dbname=webstat user=webstat"; std::string userAgentAPI = "https://useragentstring.com"; std::filesystem::path fallbackDir = "/var/log/webstat"; unsigned int dbMax = 4; unsigned int dbKeep = 2; + int idleJobsAfter = duration_cast(1min).count(); }; class Ingestor { -- cgit v1.2.3