Sha256: 6194d234eaba64ccd6d363616491a70c62014434b96f97cc492324747ef8e810
Contents?: true
Size: 951 Bytes
Versions: 17
Compression:
Stored size: 951 Bytes
Contents
# encoding: utf-8 module Moped module Failover # Disconnect is for the case when we get exceptions we do not know about, # and need to disconnect the node to cleanup the problem. # # @since 2.0.0 module Disconnect extend self # Executes the failover strategy. In the case of disconnect, we just re-raise # the exception that was thrown previously extending a socket error and # disconnect. # # @example Execute the disconnect strategy. # Moped::Failover::Disconnect.execute(exception, node) # # @param [ Exception ] exception The raised exception. # @param [ Node ] node The node the exception got raised on. # # @raise [ Errors::SocketError ] The extended exception that was thrown. # # @since 2.0.0 def execute(exception, node) node.disconnect raise(exception.extend(Errors::SocketError)) end end end end
Version data entries
17 entries across 17 versions & 2 rubygems