From 52e08dce007969c6d238c9fcbd9e86753a8b194d Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 5 Nov 2017 19:49:33 +0000 Subject: Use a slightly less surprising DB connection pool name --- p2pvr/daemon/daemon.cpp | 2 +- p2pvr/daemon/unittests/mockDefs.cpp | 6 +++--- p2pvr/daemon/unittests/testMaint.cpp | 2 +- p2pvr/etc/p2pvrd/icebox.config | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/p2pvr/daemon/daemon.cpp b/p2pvr/daemon/daemon.cpp index 3a3b40f..fbaa380 100644 --- a/p2pvr/daemon/daemon.cpp +++ b/p2pvr/daemon/daemon.cpp @@ -35,7 +35,7 @@ class P2PvrDaemon : public IceTray::Service { IceTray::OptionsResolver tmdbOpts; IceUtil::TimerPtr timer = new IceUtil::Timer(); - auto db = getConnectionPool(ic, "postgresql", "postgres"); + auto db = getConnectionPool(ic, "postgresql", "p2pvr"); auto devices = add(ic, adapter, new DevicesI(), "Devices"); auto maintenance = add(ic, adapter, new MaintenanceI(db, adapter, timer), "Maintenance"); auto si = add(ic, adapter, new SII(db), "SI"); diff --git a/p2pvr/daemon/unittests/mockDefs.cpp b/p2pvr/daemon/unittests/mockDefs.cpp index 8282492..6d180e5 100644 --- a/p2pvr/daemon/unittests/mockDefs.cpp +++ b/p2pvr/daemon/unittests/mockDefs.cpp @@ -4,14 +4,14 @@ namespace P2PVR { namespace Testing { SchemaOnlyMockDatabase::SchemaOnlyMockDatabase(const Ice::StringSeq & opts) : - PQ::Mock("user=postgres dbname=postgres", "postgres", { + PQ::Mock("user=postgres dbname=postgres", "p2pvr", { rootDir.parent_path().parent_path() / "datasources" / "schema.sql" }), IceTray::DryIce(opts) { } StandardMockDatabase::StandardMockDatabase(const Ice::StringSeq & opts) : - PQ::Mock("user=postgres dbname=postgres", "postgres", { + PQ::Mock("user=postgres dbname=postgres", "p2pvr", { rootDir.parent_path().parent_path() / "datasources/schema.sql", rootDir / "datasources" / "data.sql" }), IceTray::DryIce(opts) @@ -19,7 +19,7 @@ StandardMockDatabase::StandardMockDatabase(const Ice::StringSeq & opts) : } StandardMockDatabasePlusOffset::StandardMockDatabasePlusOffset(const Ice::StringSeq & opts) : - PQ::Mock("user=postgres dbname=postgres", "postgres", { + PQ::Mock("user=postgres dbname=postgres", "p2pvr", { rootDir.parent_path().parent_path() / "datasources" / "schema.sql", rootDir / "datasources" / "data.sql", rootDir / "datasources" / "eventOffset.sql" }), diff --git a/p2pvr/daemon/unittests/testMaint.cpp b/p2pvr/daemon/unittests/testMaint.cpp index a166d04..c15dee3 100644 --- a/p2pvr/daemon/unittests/testMaint.cpp +++ b/p2pvr/daemon/unittests/testMaint.cpp @@ -183,7 +183,7 @@ BOOST_AUTO_TEST_CASE( GetService ) BOOST_AUTO_TEST_CASE( update_events ) { BOOST_TEST_CHECKPOINT("Get a DB connection for faking stuff"); - auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("postgres")); + auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("p2pvr")); BOOST_TEST_CHECKPOINT("Write first events"); P2PVR::DVB::Testing::MockTuner::SetEventsSet(0); diff --git a/p2pvr/etc/p2pvrd/icebox.config b/p2pvr/etc/p2pvrd/icebox.config index 4336b69..4124fed 100644 --- a/p2pvr/etc/p2pvrd/icebox.config +++ b/p2pvr/etc/p2pvrd/icebox.config @@ -2,8 +2,8 @@ IceBox.Service.P2PVRD=p2pvrdaemon:createIceTrayService IceBox.InheritProperties=1 P2PVRD.ThreadPool.Size=2 P2PVRD.ThreadPool.SizeMax=10 -P2PVRD.Database.ConnectionString=user=p2pvr dbname=p2pvr P2PVRD.Endpoints=tcp -p 10001 +p2pvr.Database.ConnectionString=user=p2pvr dbname=p2pvr p2pvr.localdevices.frontend = /dev/dvb/adapter0/frontend0 p2pvr.globaldevices.carddaemon = Devices:default -h localhost -p 10000 p2pvr.storage.root = /var/store/p2pvr/recordings -- cgit v1.2.3