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

Method create_redis_connections

redis/cluster.py:2351–2370  ·  view source on GitHub ↗

This function will create a redis connection to all nodes in :nodes:

(self, nodes)

Source from the content-addressed store, hash-verified

2349 return True
2350
2351 def create_redis_connections(self, nodes):
2352 """
2353 This function will create a redis connection to all nodes in :nodes:
2354 """
2355 connection_pools = []
2356 for node in nodes:
2357 if node.redis_connection is None:
2358 node.redis_connection = self.create_redis_node(
2359 host=node.host,
2360 port=node.port,
2361 maint_notifications_config=self.maint_notifications_config,
2362 **self.connection_kwargs,
2363 )
2364 connection_pools.append(node.redis_connection.connection_pool)
2365
2366 self._event_dispatcher.dispatch(
2367 AfterPooledConnectionsInstantiationEvent(
2368 connection_pools, ClientType.SYNC, self._credential_provider
2369 )
2370 )
2371
2372 def create_redis_node(
2373 self,

Callers 2

initializeMethod · 0.95
get_redis_connectionMethod · 0.80

Calls 4

create_redis_nodeMethod · 0.95
appendMethod · 0.45
dispatchMethod · 0.45

Tested by

no test coverage detected