Module: Bones::RPC::Failover::Retry
Overview
Retry is for the case when we get exceptions around the connection, and want to make another attempt to try and resolve the issue.
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 retyr, we disconnect and reconnect, then try the operation one more time.
27 28 29 30 31 32 33 34 35 |
# File 'lib/bones/rpc/failover/retry.rb', line 27 def execute(exception, node) node.disconnect begin yield if block_given? rescue Exception => e node.down raise(e) end end |