diff options
author | alto <alto@vndb.org> | 2018-11-02 18:40:01 +0000 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2018-11-02 20:09:06 +0100 |
commit | 9f4b31ae6aa3f33856978b09481b97c5b13f4359 (patch) | |
tree | e0733b31a8fa8ca153f10aed44c19752768de3a5 /lib/Multi/Core.pm | |
parent | 08a13ed84b13d3d5e9f90cceac4aa37fb484c373 (diff) |
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)
Diffstat (limited to 'lib/Multi/Core.pm')
-rw-r--r-- | lib/Multi/Core.pm | 5 |
1 files changed, 1 insertions, 4 deletions
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"; }, |