Merge branch 'master' of https://github.com/michaeldwan/foreman into feature/concurrency
Conflicts: spec/foreman/engine_spec.rb spec/foreman/export/bluepill_spec.rb spec/resources/export/bluepill/app.pill
This commit is contained in:
@@ -5,7 +5,10 @@ class Foreman::Utils
|
||||
def self.parse_concurrency(concurrency)
|
||||
begin
|
||||
pairs = concurrency.to_s.gsub(/\s/, "").split(",")
|
||||
pairs.inject(Hash.new(1)) do |hash, pair|
|
||||
|
||||
default = concurrency.nil? ? 1 : 0
|
||||
|
||||
pairs.inject(Hash.new(default)) do |hash, pair|
|
||||
process, amount = pair.split("=")
|
||||
hash.update(process => amount.to_i)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user