Skip to content

Commit 1a7a9ee

Browse files
Added Redis connection info on verbose
1 parent fa82e3e commit 1a7a9ee

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

nslsii/sync_experiment/sync_experiment.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ def switch_redis_proposal(
157157
username: Optional[str] = None,
158158
prefix: str = "",
159159
redis_ssl: bool = False,
160+
verbose: bool = False,
160161
) -> RedisJSONDict:
161162
"""Update information in RedisJSONDict for a specific beamline
162163
@@ -180,6 +181,8 @@ def switch_redis_proposal(
180181
"""
181182
location = prefix if prefix else beamline
182183
redis_client = open_redis_client(redis_ssl=redis_ssl, redis_prefix=location)
184+
if verbose:
185+
print(f"Redis connection info: {redis_client.client().connection}")
183186
prefix = f"{prefix}-" if prefix and not redis_ssl else ""
184187
md = RedisJSONDict(redis_client=redis_client, prefix=prefix)
185188
username = username or md.get("username")
@@ -246,7 +249,7 @@ def sync_experiment(proposal_number, beamline, verbose=False, prefix="", redis_s
246249
redis_beamline = normalized_beamlines.get(beamline.lower(), beamline)
247250

248251
md = switch_redis_proposal(
249-
proposal_number, beamline=redis_beamline, username=username, prefix=prefix, redis_ssl=redis_ssl
252+
proposal_number, beamline=redis_beamline, username=username, prefix=prefix, redis_ssl=redis_ssl, verbose=verbose
250253
)
251254

252255
if verbose:

0 commit comments

Comments
 (0)