Skip to content

Commit

Permalink
redis: fix sentinel Lua script registrations
Browse files Browse the repository at this point in the history
  • Loading branch information
jd committed Sep 6, 2018
1 parent cb9be14 commit d87334e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions gnocchi/common/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,11 @@ def get_client(conf, scripts=None):
del kwargs['sentinel']
if 'sentinel_fallback' in kwargs:
del kwargs['sentinel_fallback']
master_client = sentinel_server.master_for(sentinel_name, **kwargs)
# The master_client is a redis.StrictRedis using a
# The client is a redis.StrictRedis using a
# Sentinel managed connection pool.
return master_client

client = redis.StrictRedis(**kwargs)
client = sentinel_server.master_for(sentinel_name, **kwargs)
else:
client = redis.StrictRedis(**kwargs)

if scripts is not None:
scripts = {
Expand Down

0 comments on commit d87334e

Please sign in to comment.