diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-08-27 20:49:18 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-09-01 20:02:59 +0100 |
commit | a795f8e1ece4209e587e237f5b084ec92df21a90 (patch) | |
tree | b8bc1248bac0ef0dc309b17e8d09e850723775a4 /src/webstat_logger_main.cpp | |
parent | 720b701fac13f464addb2116301d9a9a2998d041 (diff) | |
download | webstat-a795f8e1ece4209e587e237f5b084ec92df21a90.tar.bz2 webstat-a795f8e1ece4209e587e237f5b084ec92df21a90.tar.xz webstat-a795f8e1ece4209e587e237f5b084ec92df21a90.zip |
Use a DB connection pool rather than a single connection
Diffstat (limited to 'src/webstat_logger_main.cpp')
-rw-r--r-- | src/webstat_logger_main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<PQ::Connection>("dbname=webstat user=webstat"); - WebStat::Ingestor {getHostname(false), dbconn}.ingestLog(stdin); + auto pool = std::make_shared<DB::ConnectionPool>(1, 1, "postgresql", "dbname=webstat user=webstat"); + WebStat::Ingestor {getHostname(false), pool}.ingestLog(stdin); return EXIT_SUCCESS; } |