Skip to content

Commit

Permalink
added ssl support for sentinel connections (#1649)
Browse files Browse the repository at this point in the history
Co-authored-by: Christian Schläppi <cschlaeppi@hosttech.ch>
  • Loading branch information
nevious and Christian Schläppi committed May 16, 2022
1 parent f2a3e8d commit 5eb2f0b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rq/cli/helpers.py
Expand Up @@ -52,7 +52,12 @@ def get_redis_from_config(settings, connection_class=Redis):
password = settings['SENTINEL'].get('PASSWORD', None)
db = settings['SENTINEL'].get('DB', 0)
master_name = settings['SENTINEL'].get('MASTER_NAME', 'mymaster')
sn = Sentinel(instances, socket_timeout=socket_timeout, password=password, db=db)
ssl = settings['SENTINEL'].get('SSL', False)
arguments = {'password': password, 'ssl': ssl}
sn = Sentinel(
instances, socket_timeout=socket_timeout, password=password,
db=db, ssl=ssl, sentinel_kwargs=arguments
)
return sn.master_for(master_name)

ssl = settings.get('REDIS_SSL', False)
Expand Down

0 comments on commit 5eb2f0b

Please sign in to comment.