How to have Capistrano NOT rollback if a task fails

from the Capistrano Task docs there is a config you can add to if there is an error, to continue.

task :solr_start, :on_error => :continue do
    # your code here
end

Just add that to each task you want to ignore errors and continue. Though, the best possible thing is to see if you can figure out what is causing the failure and have the restart command be more robust to really restart it. I only say this, since when you try to hand off the script to someone else, they might not know exactly how to tell if it restarted correctly.

Leave a Comment

tech