Skip to content

Commit

Permalink
Merge pull request #1283 from supercaracal/fix-cluster-client-delay-l…
Browse files Browse the repository at this point in the history
…oading-for-router-module
  • Loading branch information
byroot authored Jun 4, 2024
2 parents 13f3246 + 8611b68 commit 6a8d165
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cluster/lib/redis/cluster/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ def initialize(*)
ruby2_keywords :initialize if respond_to?(:ruby2_keywords, true)

def id
@router.node_keys.join(' ')
server_url.join(' ')
end

def server_url
@router.node_keys
@router.nil? ? @config.startup_nodes.keys : router.node_keys
end

def connected?
Expand Down Expand Up @@ -115,9 +115,9 @@ def watch(*keys, &block)
end

handle_errors do
RedisClient::Cluster::OptimisticLocking.new(@router).watch(keys) do |c, slot, asking|
RedisClient::Cluster::OptimisticLocking.new(router).watch(keys) do |c, slot, asking|
transaction = Redis::Cluster::TransactionAdapter.new(
self, @router, @command_builder, node: c, slot: slot, asking: asking
self, router, @command_builder, node: c, slot: slot, asking: asking
)

result = yield transaction
Expand Down
2 changes: 1 addition & 1 deletion cluster/redis-clustering.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ Gem::Specification.new do |s|
s.required_ruby_version = '>= 2.7.0'

s.add_runtime_dependency('redis', s.version)
s.add_runtime_dependency('redis-cluster-client', '>= 0.7.11')
s.add_runtime_dependency('redis-cluster-client', '>= 0.10.0')
end

0 comments on commit 6a8d165

Please sign in to comment.