forked from Ponysearch/Ponysearch
Copy client connection kwargs before mutating
This commit is contained in:
parent
a8359dd4d3
commit
e19218c6a9
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ def initialize():
|
||||||
_CLIENT = redis.Redis.from_url(redis_url)
|
_CLIENT = redis.Redis.from_url(redis_url)
|
||||||
|
|
||||||
# log the parameters as seen by the redis lib, without the password
|
# log the parameters as seen by the redis lib, without the password
|
||||||
kwargs = _CLIENT.get_connection_kwargs()
|
kwargs = _CLIENT.get_connection_kwargs().copy()
|
||||||
kwargs.pop('password', None)
|
kwargs.pop('password', None)
|
||||||
kwargs = ' '.join([f'{k}={v!r}' for k, v in kwargs.items()])
|
kwargs = ' '.join([f'{k}={v!r}' for k, v in kwargs.items()])
|
||||||
logger.info("connecting to Redis %s", kwargs)
|
logger.info("connecting to Redis %s", kwargs)
|
||||||
|
|
Loading…
Reference in a new issue