From 5eb2f0b9a47d2522c9071dee368f6be4eb9c0367 Mon Sep 17 00:00:00 2001 From: nevious Date: Mon, 16 May 2022 10:24:37 +0200 Subject: [PATCH] added ssl support for sentinel connections (#1649) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Christian Schläppi --- rq/cli/helpers.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rq/cli/helpers.py b/rq/cli/helpers.py index 1bba186..6004e87 100644 --- a/rq/cli/helpers.py +++ b/rq/cli/helpers.py @@ -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)