Skip to content

Instantly share code, notes, and snippets.

@timothyklim
Created May 8, 2013 05:31
Show Gist options
  • Select an option

  • Save timothyklim/5538438 to your computer and use it in GitHub Desktop.

Select an option

Save timothyklim/5538438 to your computer and use it in GitHub Desktop.
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