summaryrefslogtreecommitdiff
path: root/src/ingestor.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-08-23 17:06:01 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2025-08-25 16:02:34 +0100
commitb446381dfa3f4298262ad8c7ef942d4ec64bcbea (patch)
tree464418b6892a5c30611ef23922cc55c0c03ef116 /src/ingestor.cpp
parent2db6c4f42a20c0c2a9b32545f4d6fab90be2c26d (diff)
downloadwebstat-b446381dfa3f4298262ad8c7ef942d4ec64bcbea.tar.bz2
webstat-b446381dfa3f4298262ad8c7ef942d4ec64bcbea.tar.xz
webstat-b446381dfa3f4298262ad8c7ef942d4ec64bcbea.zip
Provide hostname to Ingestor
Store its Entity immediately for later use.
Diffstat (limited to 'src/ingestor.cpp')
-rw-r--r--src/ingestor.cpp6
1 files changed, 5 insertions, 1 deletions
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)