endpoints.py 文件源码

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

项目:mercury 作者: jr0d 项目源码 文件源码
def async_endpoint(name):
    def add(f):
        log.debug('Adding async runtime endpoint {} ({})'.format(f.__name__, name))
        if not inspect.iscoroutinefunction(f):
            log.error('{} is not a coroutine'.format(f.__name__))
        elif name in async_endpoints:
            log.error('{} already exists in table'.format(name))
        else:
            async_endpoints[name] = f
        return f
    return add
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号