MCPcopy
hub / github.com/redis/redis-py / AfterSingleConnectionInstantiationEvent

Class AfterSingleConnectionInstantiationEvent

redis/event.py:251–279  ·  view source on GitHub ↗

Event that will be fired after single connection instances was created. :param connection_lock: For sync client thread-lock should be provided, for async asyncio.Lock

Source from the content-addressed store, hash-verified

249
250
251class AfterSingleConnectionInstantiationEvent:
252 """
253 Event that will be fired after single connection instances was created.
254
255 :param connection_lock: For sync client thread-lock should be provided,
256 for async asyncio.Lock
257 """
258
259 def __init__(
260 self,
261 connection,
262 client_type: ClientType,
263 connection_lock: Union[threading.RLock, asyncio.Lock],
264 ):
265 self._connection = connection
266 self._client_type = client_type
267 self._connection_lock = connection_lock
268
269 @property
270 def connection(self):
271 return self._connection
272
273 @property
274 def client_type(self) -> ClientType:
275 return self._client_type
276
277 @property
278 def connection_lock(self) -> Union[threading.RLock, asyncio.Lock]:
279 return self._connection_lock
280
281
282class AfterPubSubConnectionInstantiationEvent:

Callers 2

__init__Method · 0.90
initializeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected