class Convection::Model::Cloudfile
Define your Clouds
Attributes
attributes[R]
deck[R]
stack_groups[R]
stacks[R]
Public Class Methods
new(cloudfile)
click to toggle source
# File lib/convection/model/cloudfile.rb, line 63 def initialize(cloudfile) @attributes = Model::Attributes.new @stacks = {} @deck = [] @stack_groups = {} @thread_count ||= 2 instance_eval(IO.read(cloudfile), cloudfile, 1) work_q = Queue.new @deck.each { |stack| work_q.push(stack) } workers = (0...@thread_count).map do Thread.new do until work_q.empty? stack = work_q.pop(true) stack.template_status stack.load_template_info if stack.exist? end end end workers.each(&:join) end