Created
August 20, 2016 16:38
-
-
Save EugenMayer/b0f49c99d28e66f3e4179c967540faa2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'docker-compose' | |
threads = [] | |
project_paths = %w(/project/path1 /project/path2 /project/path3 /project/path) | |
project_paths.each do |path| | |
threads.push Docker::Compose::Session.new(dir:compose_base_path1) | |
end | |
begin | |
threads.each do |thread| | |
thread.join | |
end | |
rescue SystemExit, Interrupt | |
threads.each do |thread| | |
thread.kill | |
end | |
rescue Exception => e | |
handle_exception e | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment