From a795f8e1ece4209e587e237f5b084ec92df21a90 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 27 Aug 2025 20:49:18 +0100 Subject: Use a DB connection pool rather than a single connection --- src/webstat_logger_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/webstat_logger_main.cpp') diff --git a/src/webstat_logger_main.cpp b/src/webstat_logger_main.cpp index 0db940a..1a2c8cb 100644 --- a/src/webstat_logger_main.cpp +++ b/src/webstat_logger_main.cpp @@ -46,7 +46,7 @@ main(int argc, char ** argv) } po::notify(optVars); - auto dbconn = std::make_shared("dbname=webstat user=webstat"); - WebStat::Ingestor {getHostname(false), dbconn}.ingestLog(stdin); + auto pool = std::make_shared(1, 1, "postgresql", "dbname=webstat user=webstat"); + WebStat::Ingestor {getHostname(false), pool}.ingestLog(stdin); return EXIT_SUCCESS; } -- cgit v1.2.3