async.py 文件源码

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

项目:eea.corpus 作者: eea 项目源码 文件源码
def worker(config_uri):
    """ Console entry script that starts a worker process
    """
    # TODO: import spacy's model to share it between workers

    pyramid_env = bootstrap(config_uri)

    # this conflicts with normal worker output
    # TODO: solve logging for the console
    # Setup logging to allow log output from command methods
    # from pyramid.paster import setup_logging
    # setup_logging(config_uri)

    try:
        qs = ['default']
        conn = redis_connection()
        with Connection(conn):
            w = Worker(qs)
            w.work()
    finally:
        pyramid_env['closer']()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号