Skip to content

Commit 80a1914

Browse files
authored
chore: use a local variable instead of a constant variable for startup size (#261)
1 parent f6c6520 commit 80a1914

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/redis_client/cluster/node.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def load_info(options, concurrent_worker, **kwargs) # rubocop:disable Metrics/Ab
9292
raise ::RedisClient::Cluster::InitialSetupError, [] if options.nil? || options.empty?
9393

9494
startup_size = options.size > MAX_STARTUP_SAMPLE ? MAX_STARTUP_SAMPLE : options.size
95-
startup_options = options.to_a.sample(MAX_STARTUP_SAMPLE).to_h
95+
startup_options = options.to_a.sample(startup_size).to_h
9696
startup_nodes = ::RedisClient::Cluster::Node.new(startup_options, concurrent_worker, **kwargs)
9797
work_group = concurrent_worker.new_group(size: startup_size)
9898

0 commit comments

Comments
 (0)