summaryrefslogtreecommitdiff
path: root/lib/lib_ext/capistrano_connections.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lib_ext/capistrano_connections.rb')
-rw-r--r--lib/lib_ext/capistrano_connections.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/lib_ext/capistrano_connections.rb b/lib/lib_ext/capistrano_connections.rb
new file mode 100644
index 0000000..c46455f
--- /dev/null
+++ b/lib/lib_ext/capistrano_connections.rb
@@ -0,0 +1,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
+
+