aboutsummaryrefslogtreecommitdiff
path: root/lib/lib_ext/capistrano_connections.rb
blob: c46455f2da6e6124c92aa91c810143fb8a881aec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module Capistrano
  class Configuration
    module Connections
      def failed!(server)
        @failure_callback.call(server) if @failure_callback
        Thread.current[:failed_sessions] << server
      end

      def call_on_failure(&block)
        @failure_callback = block
      end
    end
  end
end