Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
DennyWeinberg authored Mar 30, 2022
1 parent ba2f19c commit a4ef4c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rq_dashboard/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ def setup_rq_connection():
redis_url = current_app.config.get("RQ_DASHBOARD_REDIS_URL")
if isinstance(redis_url, string_types):
current_app.config["RQ_DASHBOARD_REDIS_URL"] = (redis_url,)
_, current_app.redis_conn = from_url((redis_url,)[0], client_option={'ssl_cert_reqs': None})
_, current_app.redis_conn = from_url((redis_url,)[0], client_options={'ssl_cert_reqs': None})
elif isinstance(redis_url, (tuple, list)):
_, current_app.redis_conn = from_url(redis_url[0], client_option={'ssl_cert_reqs': None})
_, current_app.redis_conn = from_url(redis_url[0], client_options={'ssl_cert_reqs': None})
else:
raise RuntimeError("No Redis configuration!")

Expand All @@ -79,7 +79,7 @@ def push_rq_connection():
if new_instance_number is not None:
redis_url = current_app.config.get("RQ_DASHBOARD_REDIS_URL")
if new_instance_number < len(redis_url):
_, new_instance = from_url(redis_url[new_instance_number], client_option={'ssl_cert_reqs': None})
_, new_instance = from_url(redis_url[new_instance_number], client_options={'ssl_cert_reqs': None})
else:
raise LookupError("Index exceeds RQ list. Not Permitted.")
else:
Expand Down

0 comments on commit a4ef4c7

Please sign in to comment.