Created
December 19, 2013 09:40
-
-
Save crhan/8036764 to your computer and use it in GitHub Desktop.
make capistrano deploy code in a limited parallel
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
namespace :deploy do | |
## set max_hosts 20 or via env | |
set :max_hosts, ENV['MAXHOSTS'] || 20 | |
## set max_hosts on update_code | |
task :update_code, :except => { :no_release => true }, :max_hosts => "#{max_hosts}" do | |
logger.info "\e[0;31;1mNOTICE:\e[0m Pulling repo from #{repository}: max_hosts => '#{max_hosts}'" | |
on_rollback { run "rm -rf #{release_path}; true" } | |
strategy.deploy! | |
finalize_update | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment