From b446381dfa3f4298262ad8c7ef942d4ec64bcbea Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 23 Aug 2025 17:06:01 +0100 Subject: Provide hostname to Ingestor Store its Entity immediately for later use. --- src/ingestor.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/ingestor.cpp') diff --git a/src/ingestor.cpp b/src/ingestor.cpp index a5a2e57..4084d2e 100644 --- a/src/ingestor.cpp +++ b/src/ingestor.cpp @@ -41,7 +41,11 @@ namespace WebStat { } } - Ingestor::Ingestor(DB::ConnectionPtr dbconn) : dbconn {std::move(dbconn)} { } + Ingestor::Ingestor(const std::string_view hostname, DB::ConnectionPtr dbconn) : + hostnameId {crc32(hostname)}, dbconn {std::move(dbconn)} + { + storeEntity({hostnameId, hostname}); + } Ingestor::ScanResult Ingestor::scanLogLine(std::string_view input) -- cgit v1.2.3