Module: Bones::RPC::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.
26 27 28 29 |
# File 'lib/bones/rpc/failover/disconnect.rb', line 26 def execute(exception, node) node.disconnect raise(exception.extend(Errors::SocketError)) end |