Browse files

update cap callback order so that crontab is cleared BEFORE updating …

…it instead of after

finalize_update is called inside the block of update_code
https://github.com/mpasternacki/capistrano-documentation-support-files/raw/master/default-execution-path/Capistrano%20Execution%20Path.jpg
previous callback order would always clear the crontab
  • Loading branch information...
1 parent 28946b9 commit 0446b02e6503e9552d6e9b4687e5da80252e9752 @s01ipsist committed Jul 15, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/whenever/capistrano.rb
View
4 lib/whenever/capistrano.rb
@@ -3,9 +3,9 @@
Capistrano::Configuration.instance(:must_exist).load do
# Disable cron jobs at the begining of a deploy.
- after "deploy:update_code", "whenever:clear_crontab"
+ before "deploy:update_code", "whenever:clear_crontab"
# Write the new cron jobs near the end.
- before "deploy:finalize_update", "whenever:update_crontab"
+ after "deploy:finalize_update", "whenever:update_crontab"
# If anything goes wrong, undo.
after "deploy:rollback", "whenever:update_crontab"

0 comments on commit 0446b02

Please sign in to comment.