From ae0ee6bbfb4dcd1f112876d0e7e5b3bcabdfb002 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 17 Mar 2026 17:33:14 +0000 Subject: Use std::future over std::thread for background jobs Easier checking if a job has completed [successfully] and reseting state for the next time. --- src/ingestor.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ingestor.hpp') diff --git a/src/ingestor.hpp b/src/ingestor.hpp index c5628d6..0bf2297 100644 --- a/src/ingestor.hpp +++ b/src/ingestor.hpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -78,7 +79,7 @@ namespace WebStat { const Impl impl; LastRunTime lastRun {LastRunTime::clock::now()}; - std::optional currentRun {std::nullopt}; + std::optional> currentRun; }; Job::LastRunTime lastCheckedJobs {Job::LastRunTime::clock::now()}; -- cgit v1.3