def connect(self):
"""
Get an connection for the self instance
"""
if self._pool is None:
async with self._lock:
if self._pool is None:
self._pool = await aioredis.create_pool(
(self.host, self.port), minsize=1, maxsize=100)
return await self._pool
评论列表
文章目录