Module: Aerospike::Node::Refresh::Racks
- Defined in:
- lib/aerospike/node/refresh/racks.rb
Class Method Summary collapse
- .call(node) ⇒ Object
-
.should_refresh?(node) ⇒ Boolean
Do not refresh racks when node connection has already failed during this cluster tend iteration.
Class Method Details
.call(node) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/aerospike/node/refresh/racks.rb', line 25 def call(node) return unless should_refresh?(node) Aerospike.logger.info("Updating racks for node #{node.name}") conn = node.tend_connection parser = RackParser.new(node, conn) node.update_racks(parser) rescue ::Aerospike::Exceptions::Aerospike => e conn.close Refresh::Failed.(node, e) end |
.should_refresh?(node) ⇒ Boolean
Do not refresh racks when node connection has already failed during this cluster tend iteration.
39 40 41 42 |
# File 'lib/aerospike/node/refresh/racks.rb', line 39 def should_refresh?(node) return false if node.failed? || !node.active? true end |