Module: Redis::Cluster::CommandLoader

Defined in:
lib/redis/cluster/command_loader.rb

Overview

Load details about Redis commands for Redis Cluster Client

Class Method Summary collapse

Class Method Details

.load(nodes) ⇒ Object

Raises:



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/redis/cluster/command_loader.rb', line 12

def load(nodes)
  nodes.each do |node|
    begin
      return fetch_command_details(node)
    rescue CannotConnectError, ConnectionError, CommandError
      next # can retry on another node
    end
  end

  raise CannotConnectError, 'Redis client could not connect to any cluster nodes'
end