tasks.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:toshi-services-lib 作者: toshiapp 项目源码 文件源码
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")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号