Commit 9e464709 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

refactor(backend): remove unnecessary domain shutdowns

parent 3b1413e1
......@@ -3150,12 +3150,13 @@ sub _refresh_down_domains($self, $active_domain, $active_vm) {
}
}
sub _remove_unnecessary_downs($self, $domain=undef) {
my @domains = $self->list_domains( active => 0 ) if !$domain;
sub _remove_unnecessary_downs($self, @domains) {
@domains = $self->list_domains( active => 0 ) if !scalar @domains;
for my $domain (@domains) {
my @requests = $domain->list_requests(1);
for my $req (@requests) {
$req->status('done') if $req->command =~ /^shutdown/;
$req->status('done') if $req->command =~ /shutdown/;
$req->_remove_messages();
}
}
......
Supports Markdown
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