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

Method initialize

redis/asyncio/client.py:464–475  ·  view source on GitHub ↗
(self: _RedisT)

Source from the content-addressed store, hash-verified

462 return self.initialize().__await__()
463
464 async def initialize(self: _RedisT) -> _RedisT:
465 if self.single_connection_client:
466 async with self._single_conn_lock:
467 if self.connection is None:
468 self.connection = await self.connection_pool.get_connection()
469
470 self._event_dispatcher.dispatch(
471 AfterSingleConnectionInstantiationEvent(
472 self.connection, ClientType.ASYNC, self._single_conn_lock
473 )
474 )
475 return self
476
477 def set_response_callback(self, command: str, callback: ResponseCallbackT):
478 """Set a custom Response Callback"""

Callers 6

__await__Method · 0.95
__aenter__Method · 0.95
execute_commandMethod · 0.95

Calls 3

get_connectionMethod · 0.45
dispatchMethod · 0.45

Tested by 2