Commit 5e30e07a authored by Leo Gordon's avatar Leo Gordon
Browse files

propagate currently set DBC options into the URL generated

parent 9db16608
......@@ -106,6 +106,14 @@ sub url {
}
$url .= '/' . $self->dbname;
my @opt_pairs = ();
foreach my $option ('disconnect_when_inactive', 'wait_timeout', 'reconnect_when_lost') {
if( defined(my $value = $self->$option()) ) {
push @opt_pairs, "$option=$value";
}
}
$url = join(';', $url, @opt_pairs);
return $url;
}
......
......@@ -163,7 +163,7 @@ sub main {
}
if( $self->{'url'} ) { # protect the URL that we pass to Workers by hiding the password in %ENV:
$self->{'url'} = $self->{'dba'}->dbc->url('EHIVE_PASS');
$self->{'url'} = "'". $self->{'dba'}->dbc->url('EHIVE_PASS') ."'";
}
my $queen = $self->{'dba'}->get_Queen;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment