title: How to have Capistrano NOT rollback if a task fails
body: <p>We're using Capistrano/Webistrano (with Lee Hambley's railsless-deploy gem) to push our PHP application to production servers.  I have some custom tasks that get run during various parts of the deploy process.</p>
  
  <p>As an example, I have tasks that attempt to stop and restart a jetty solr instance.  However, sometimes this bit fails during the deploy, so Capistrano rolls back the entire deploy and reverts back to the previous revision.  This is a pain.  :-)</p>
  
  <p>I'd like to tell Capistrano to ignore the return result of these tasks, so if they fail, Capistrano continues on it's way and finishes the deploy anyway.  It's very easy for me to ssh to the server after the fact and properly kill and restart the solr instance, rather than having to do a complete deploy again.</p>
  
  <p>Here is some relevant parts of the deploy script:</p>
  
  <pre><code>before "deploy:symlink", :solr_kill
  after "deploy:symlink", :solr_start, :solr_index
  
  task :solr_kill do
      run "cd #{current_path}/Base ; #{sudo} phing solr-kill"
  end
  
  task :solr_start do
      run "cd #{current_path}/Base ; #{sudo} phing solr-start"
      run "sleep 10"
  end
  
  task :solr_index do
      run "#{sudo} #{current_path}/Base/Bin/app.php cron run solr_index_cron"
  end
  </code></pre>