Created
April 14, 2014 06:15
-
-
Save gonzariosm/10620693 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
namespace :deploy do | |
desc 'Restart application' | |
task :restart do | |
on roles(:app), in: :sequence, wait: 5 do | |
# Your restart mechanism here, for example: | |
execute :touch, release_path.join('tmp/restart.txt') | |
end | |
end | |
after :publishing, :restart | |
after :restart, :clear_cache do | |
on roles(:web), in: :groups, limit: 3, wait: 10 do | |
# Here we can do anything such as: | |
within release_path do | |
execute :rake, 'cache:clear' | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment