diff --git a/lib/pve/cli/ct.rb b/lib/pve/cli/ct.rb index 353c8df..e7debb0 100644 --- a/lib/pve/cli/ct.rb +++ b/lib/pve/cli/ct.rb @@ -11,8 +11,7 @@ def cli_ct ct_cli.cmd( :status, "Lists CTs with status", aliases: [nil], &lambda {|target=nil, sort: nil, node: nil, status: nil, tags: nil| hosting_table target: target, status: status, sort: sort, tags: tags do |push| - node_opt( node). - each( &push).lazy. + node_opt( node).lazy. map {|n| Thread.new n, &:lxc }. each {|n| n.value.each &push } end diff --git a/lib/pve/cli/qm.rb b/lib/pve/cli/qm.rb index 94f2bbc..0635c8d 100644 --- a/lib/pve/cli/qm.rb +++ b/lib/pve/cli/qm.rb @@ -53,8 +53,7 @@ def cli_qm qm_cli.cmd( :status, "Lists VMs with status", aliases: [nil], &lambda {|target=nil, sort: nil, node: nil, status: nil, tags: nil| hosting_table target: target, status: status, sort: sort, tags: tags do |push| - node_opt( node). - each( &push).lazy. + node_opt( node).lazy. flat_map {|n| [ Thread.new( n, &:qemu) ] }. each {|n| n.value.each &push } end