Commit b6a8db9d authored by frankiejol's avatar frankiejol
Browse files

refactor(backend): do not connect nor disconnect on start

parent f9f24228
......@@ -3373,11 +3373,9 @@ sub _execute {
$self->_wait_pids;
return if !$self->_can_fork($request);
$self->disconnect_vm();
my $pid = fork();
die "I can't fork" if !defined $pid;
$self->disconnect_vm();
if ( $pid == 0 ) {
srand();
$self->_do_execute_command($sub, $request);
......@@ -5166,7 +5164,7 @@ Returns the list of Virtual Managers
sub vm($self) {
my $sth = $CONNECTOR->dbh->prepare(
"SELECT id FROM vms "
"SELECT id FROM vms WHERE is_active=1"
);
$sth->execute();
my @vms;
......
......@@ -262,9 +262,6 @@ sub start {
$Ravada::CONNECTOR->dbh;
$ravada->_install();
$ravada->set_debug_value();
for my $vm (@{$ravada->vm}) {
$vm->id;
}
$ravada->_wait_pids();
autostart_machines($ravada);
}
......
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