allow concurrency to be used in development mode

This commit is contained in:
David Dollar
2010-07-19 17:08:42 -07:00
parent 096f532624
commit 0b6fdad3a2
7 changed files with 61 additions and 24 deletions
+15
View File
@@ -0,0 +1,15 @@
require "foreman"
class Foreman::Utils
def self.parse_concurrency(concurrency)
@concurrency ||= begin
pairs = concurrency.to_s.gsub(/\s/, "").split(",")
pairs.inject(Hash.new(1)) do |hash, pair|
process, amount = pair.split("=")
hash.update(process => amount.to_i)
end
end
end
end