def _start(self):
self._shutdown_task_dispatch = False
try:
if not hasattr(self, 'aio_redis_connection_pool') or self.aio_redis_connection_pool.closed():
self.aio_redis_connection_pool = await aioredis.create_pool(**self._get_redis_config())
if not hasattr(self, '_disp_task') or self._disp_task.done():
self._disp_task = asyncio.ensure_future(self._task_dispatch_loop())
except:
log.exception("failed to start")
评论列表
文章目录