File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,11 @@ def switch_redis_proposal(
180180 The updated redis dictionary.
181181 """
182182 location = prefix if prefix else beamline
183- redis_client = open_redis_client (redis_ssl = redis_ssl , redis_prefix = location )
183+ if redis_ssl :
184+ redis_client = open_redis_client (redis_ssl = redis_ssl , redis_prefix = location )
185+ else :
186+ redis_url = f"info.{ beamline } .nsls2.bnl.gov"
187+ redis_client = open_redis_client (redis_ssl = redis_ssl , redis_prefix = location , redis_url = redis_url )
184188 if verbose :
185189 print (f"Redis connection info: { redis_client .client ().connection } " )
186190 prefix = f"{ prefix } -" if prefix and not redis_ssl else ""
Original file line number Diff line number Diff line change @@ -51,8 +51,9 @@ def open_redis_client(
5151 """
5252 Helper function to get the redis client connection.
5353 """
54- redis_url = os .getenv ("REDIS_HOST" , redis_url )
55- if not redis_url :
54+ if os .getenv ("REDIS_HOST" ):
55+ redis_url = os .getenv ("REDIS_HOST" )
56+ if redis_url is None :
5657 if redis_ssl :
5758 client_loc_id = (
5859 redis_prefix if redis_prefix else socket .gethostname ().split ("-" )[0 ]
You can’t perform that action at this time.
0 commit comments