Skip to content

Commit

Permalink
Add missing defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
aeroastro committed Nov 17, 2020
1 parent 087a11b commit ec3c444
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/redis/client.rb
Expand Up @@ -6,12 +6,17 @@

class Redis
class Client

# Defaults are also used for converting string keys to symbols.
DEFAULTS = {
url: -> { ENV["REDIS_URL"] },
scheme: "redis",
host: "127.0.0.1",
port: 6379,
path: nil,
read_timeout: nil,
write_timeout: nil,
connect_timeout: nil,
timeout: 5.0,
password: nil,
db: 0,
Expand All @@ -22,6 +27,7 @@ class Client
reconnect_delay: 0,
reconnect_delay_max: 0.5,
inherit_socket: false,
logger: nil,
sentinels: nil,
role: nil
}.freeze
Expand Down

0 comments on commit ec3c444

Please sign in to comment.