Closes #2259 (closed)
-
Redis connections created with
single_connection_client=True
were not all closed byclean_all_redis_connection
(in addition single connections and reusable connections were stored in the same dict so you could in principle end up reusing a single connection) -
Added tests for Redis connection cleanup (introduced
clean_socket
in analogy toclean_gevent
) -
Change the modbus server from the test suite from threaded (yikes) to subprocess
-
Add some docstrings to the Beacon connection class + minor refactoring/renaming of internals (the words "connection" and "pool" should be chosen with care)
-
What we called a Redis connection is not a Redis connection, it is a proxy (like tango's DeviceProxy). Refactor to make that clear:
-
get_redis_proxy
: returnsSafeRedisDbProxy
-
get_fixed_connection_redis_proxy
: returnsFixedConnectionRedisDbProxy
-
get_redis_connection
: returnsredis.Redis
(DEPRECATED)
This is applied to
bliss.config.conductor.connection.Connection
andbliss.config.conductor.client
. -
-
The new
redis_connection.py
module removes the Redis logic fromconnection.py
which is for the Beacon connection. For example this is more or less whatConnection.get_redis_proxy
does (without the caching and cleanup sugar):from bliss.config.conductor.redis_connection import create_connection_pool pool = create_connection_pool("redis://localhost:25002", db=1) rdb_proxy = pool.create_proxy() # The proxy provides an API for Redis commands: print(rdb_proxy.keys())