summaryrefslogtreecommitdiff
path: root/src/ingestor.hpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-10-02 23:42:52 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2025-10-02 23:42:52 +0100
commit5aa9cca0d2ff25c541d7df3b63519c28eb75b656 (patch)
treec43e515374b08e2897b295c2706b8797cfc1e38b /src/ingestor.hpp
parentedfaf671d016f675a3a3b87d58d615a92e84148b (diff)
downloadwebstat-5aa9cca0d2ff25c541d7df3b63519c28eb75b656.tar.bz2
webstat-5aa9cca0d2ff25c541d7df3b63519c28eb75b656.tar.xz
webstat-5aa9cca0d2ff25c541d7df3b63519c28eb75b656.zip
Add point to execute scheduled jobs when idle
Diffstat (limited to 'src/ingestor.hpp')
-rw-r--r--src/ingestor.hpp4
1 files changed, 4 insertions, 0 deletions
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 <sys/utsname.h>
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<milliseconds>(1min).count();
};
class Ingestor {