Module: Moped::Failover::Disconnect
Overview
Disconnect is for the case when we get exceptions we do not know about, and need to disconnect the node to cleanup the problem.
Instance Method Summary collapse
-
#execute(exception, node) ⇒ Object
Executes the failover strategy.
Instance Method Details
#execute(exception, node) ⇒ Object
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.
25 26 27 28 |
# File 'lib/moped/failover/disconnect.rb', line 25 def execute(exception, node) node.disconnect raise(exception.extend(Errors::SocketError)) end |