Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

run whenever:update_crontab before deploy:resart because the symlink …

…task was renamed in a later versions of Cap making it impossible to be compatible with old and and new version using that task as a hook. close #213
  • Loading branch information...
commit fba25d3341fb688a44a2c79c9d62888a2b21fd1a 1 parent 6f99128
@javan authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/whenever/capistrano.rb
View
2  lib/whenever/capistrano.rb
@@ -11,7 +11,7 @@
# Disable cron jobs at the begining of a deploy.
after "deploy:update_code", "whenever:clear_crontab"
# Write the new cron jobs near the end.
- after "deploy:symlink", "whenever:update_crontab"
+ before "deploy:restart", "whenever:update_crontab"
# If anything goes wrong, undo.
after "deploy:rollback", "whenever:update_crontab"

5 comments on commit fba25d3

@leehambley

What's wrong with deploy:finalize_update ?

@javan
Owner

I don't know, what's right about deploy:finalize_update? ;)

@leehambley

It's the end of successful deployment, and marks the end of successul deploy, this is the place internally that log files, tempfiles, etc are touched, rotated, etc.

As the one who removed renamed the deploy:symlink task from Capistrano, I'd recommend finalize_update as the correct place to add callbacks.

I found this commit because I don't restart with Capistrano, I have monit watch the REVISION file, and gracefully restart services when it changes, and my crontab hasn't been getting installed.

What do you think? I'm also open to adding callbacks for this kind of thing to Capistrano, when there's common use cases such as this, I'd be more than happy to agree on more callback points.

@javan
Owner

Cool, works for me. Thanks for the explanation!

@gucki

It's still deploy:restart on master....?

Please sign in to comment.
Something went wrong with that request. Please try again.