In case it helps, this is the hack we use currently:

module Capistrano
  class Configuration
      # Track hosts which fail and don't try them for future commands
      # If no failure mode preference is set, we set it to ignore failed servers
      def wrapped_execute_on_servers(options = {}, &block)
        options.merge!({ :except => { :task_status => :failed }})
unless options.any? { |o| o.is_a?(Hash) and o.has_key?(:task_status) }
        begin
          capistrano_execute_on_servers(options, &block)
        rescue ScriptError # We don't care if we have run out of hosts
to run on, carry on anyway.
        rescue Capistrano::CommandError => error # Record failed hosts
so that we don't try to run on them again.
            error.hosts.each { |server|
              server.options[:task_status] = :failed
            }
        end
      end
      alias capistrano_execute_on_servers execute_on_servers
      alias execute_on_servers wrapped_execute_on_servers
  end
end

This in combination with the connection hack I mentioned gives us the
right behaviour.

We've some other things we patch, so that we can log output from
servers individually, but this hack and the last one are the
behavioral things we needed to change.

--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to