Skip to content

Commit

Permalink
Merge pull request #630 from splitrb/remove-old-redis-config
Browse files Browse the repository at this point in the history
Remove thread_safe config as redis-rb is thread_safe by default since 2.2
  • Loading branch information
andrehjr authored Jun 22, 2020
2 parents eefce9a + 41502b2 commit 508c1d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/split.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ module Split
# `Redis::DistRedis`, or `Redis::Namespace`.
def redis=(server)
@redis = if server.is_a?(String)
Redis.new(:url => server, :thread_safe => true)
Redis.new(url: server)
elsif server.is_a?(Hash)
Redis.new(server.merge(:thread_safe => true))
Redis.new(server)
elsif server.respond_to?(:smembers)
server
else
Expand Down

0 comments on commit 508c1d0

Please sign in to comment.