Class: Cerberus::BuildAllCommand
- Inherits:
-
Object
- Object
- Cerberus::BuildAllCommand
- Defined in:
- lib/cerberus/manager.rb
Instance Method Summary collapse
-
#initialize(cli_options = {}) ⇒ BuildAllCommand
constructor
A new instance of BuildAllCommand.
- #run ⇒ Object
Constructor Details
#initialize(cli_options = {}) ⇒ BuildAllCommand
Returns a new instance of BuildAllCommand.
189 190 191 |
# File 'lib/cerberus/manager.rb', line 189 def initialize( = {}) @cli_options = end |
Instance Method Details
#run ⇒ Object
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/cerberus/manager.rb', line 193 def run threads = [] Dir["#{HOME}/config/*.yml"].each do |fn| fn =~ %r{#{HOME}/config/(.*).yml} application_name = $1 command = Cerberus::BuildCommand.new(application_name, @cli_options) threads << Thread.new { command.run } if command.run_time?(Time.now) end @already_waited = false threads.each do |t| if @already_waited or not t.join(LOCK_WAIT) t.kill @already_waited = true end end end |