Skip to content

Commit

Permalink
wip: connect without tcp to localhost db
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiejol committed May 2, 2024
1 parent 938a79c commit 0ae5380
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/Ravada.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3021,7 +3021,7 @@ sub _connect_dbh($self=undef) {

my $data_source = "DBI:$driver:$db";
$data_source = "DBI:$driver:database=$db;host=$host"
if $host && $host ne 'localhost';
if $host && $host ne 'localhost' && $host ne '127.0.0.1';

my $con;
for my $try ( 1 .. 10 ) {
Expand All @@ -3040,7 +3040,7 @@ sub _connect_dbh($self=undef) {

return $con if $con && !$err;
sleep 1;
warn "Try $try $@\n";
warn "Try $try $data_source $@\n";
}
die ($@ or "Can't connect to $driver $db at $host");
}
Expand Down
3 changes: 1 addition & 2 deletions t/lib/Test/Ravada.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1726,8 +1726,7 @@ sub remove_old_storage_pools() {
remove_old_storage_pools_void();
}

sub clean($ldap=undef) {
my $file_remote_config = shift;
sub clean($ldap=undef, $file_remote_config=undef) {
remove_old_domains();
remove_old_disks();
remove_old_pools();
Expand Down

0 comments on commit 0ae5380

Please sign in to comment.