Created
May 8, 2013 05:31
-
-
Save timothyklim/5538438 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| desc "Restart Application serially on all servers" | |
| task :restart, :roles => :app do | |
| find_servers_for_task(current_task).each do |server| | |
| run "touch #{jboss_home}/standalone/deployments/#{application}-knob.yml.dodeploy", :hosts => server.host | |
| logger.info "Waiting for TorqueBox to finish restarting..." | |
| # Sleep until the app appears to be started again | |
| run "while ls #{jboss_home}/standalone/deployments/#{application}-knob.yml.dodeploy > /dev/null 2>&1; do sleep 1; done", :hosts => server.host | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment