lib/cobra_commander/executor.rb in cobra_commander-0.10.0 vs lib/cobra_commander/executor.rb in cobra_commander-0.11.0
- old
+ new
@@ -4,16 +4,16 @@
require_relative "executor/multi_exec"
module CobraCommander
# Execute commands on all components of a ComponentTree
module Executor
- def self.exec(components, command, output = $stdout, status_output = $stderr)
+ def self.exec(components:, command:, concurrency:, output: $stdout, status_output: $stderr)
components = Array(components)
exec = if components.size == 1
ComponentExec.new(components.first)
else
- MultiExec.new(components)
+ MultiExec.new(components, concurrency: concurrency, spin_output: status_output)
end
- exec.run(command, output: output, spin_output: status_output)
+ exec.run(command, output: output)
end
end
end