Update houdini.py

Fix aioredis 2.0
This commit is contained in:
AllinolCP 2021-07-31 18:03:08 +07:00 committed by GitHub
parent a8fc63393e
commit 239b0dad7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,10 +133,8 @@ class Houdini:
self.config.database_name)) self.config.database_name))
self.logger.info('Booting Houdini') self.logger.info('Booting Houdini')
pool = aioredis.ConnectionPool.from_url(f'redis://{self.config.redis_address}:{self.config.redis_port}')
self.redis = await aioredis.create_redis_pool('redis://{}:{}'.format( self.redis = aioredis.Redis(connection_pool=pool)
self.config.redis_address, self.config.redis_port),
minsize=5, maxsize=10)
if self.config.type == 'world': if self.config.type == 'world':
await self.redis.delete(f'houdini.players.{self.config.id}') await self.redis.delete(f'houdini.players.{self.config.id}')