How do I rollback capistrano tasks upon failure?

Posted by dchua on Stack Overflow See other posts from Stack Overflow or by dchua
Published on 2010-03-13T05:36:01Z Indexed on 2010/03/13 5:45 UTC
Read the original article Hit count: 523

In my Capistrano deploy.rb, I have a couple of daemons like delayed_jobs and fetcher, starting and stopping depending on where they are in the deployment process.

This method would create problems if a deployment fails, because the daemons wouldn't be managed properly (ie. two processes spawned instead of one, or processes were shutdown without restarting itself until the next deployment).

Is there anyway to prevent this from happening like a rollback code? How is deployment of daemons normally done over capistrano?

© Stack Overflow or respective owner

Related posts about capistrano

Related posts about ruby-on-rails