Skip to content
Snippets Groups Projects
Commit 6a92ba38 authored by Roman Shishkin's avatar Roman Shishkin
Browse files

Fix redis feature

parent 4485de7e
No related branches found
Tags 0.10.2
No related merge requests found
Pipeline #6800 passed
......@@ -118,12 +118,9 @@ class RedisAppFeature(AppFeature):
async def on_startup(self):
cluster = self.config.get('cluster', False)
follow_cluster = self.config.get('follow_cluster', True)
nodes = self.config.get('nodes', 'redis://172.17.0.1').split(',')
kwargs = {
"follow_cluster": follow_cluster,
}
kwargs = {}
pool_minsize = self.config.get("pool_minsize")
if pool_minsize:
......@@ -142,6 +139,7 @@ class RedisAppFeature(AppFeature):
kwargs["password"] = password
if cluster:
kwargs["follow_cluster"] = self.config.get('follow_cluster', True)
self._client = await aioredis_cluster.create_redis_cluster(nodes, **kwargs)
else:
self._client = await aioredis.create_redis_pool(nodes[0], **kwargs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment