From 9f4b31ae6aa3f33856978b09481b97c5b13f4359 Mon Sep 17 00:00:00 2001 From: alto Date: Fri, 2 Nov 2018 18:40:01 +0000 Subject: Change Multi to use separate setting for db_login and to use UNIX socket for Postgres Update README with basic information on Multi (cherry picked from commit 01188a82ab736a8975c73ac5ec12621426bf6bf2) --- lib/Multi/Core.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/Multi/Core.pm b/lib/Multi/Core.pm index 82b3a9c6..3656f5b7 100644 --- a/lib/Multi/Core.pm +++ b/lib/Multi/Core.pm @@ -72,11 +72,8 @@ sub daemon_done { sub load_pg { - my @db = @{$VNDB::O{db_login}}; - my @dsn = DBI->parse_dsn($db[0]); - my %vars = split /[,=]/, $dsn[4]; $PG = AnyEvent::Pg::Pool->new( - {%vars, user => $db[1], password => $db[2], host => 'localhost'}, + $VNDB::M{db_login}, timeout => 600, # Some maintenance queries can take a while to run... on_error => sub { die "Lost connection to PostgreSQL\n"; }, on_connect_error => sub { die "Lost connection to PostgreSQL\n"; }, -- cgit v1.2.3