__init__.py 文件源码

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

项目:piwheels 作者: bennuttall 项目源码 文件源码
def do_send(builder, filename):
    """
    Handles sending files when requested by :func:`do_import`.
    """
    logging.info('Sending %s to master', filename)
    pkg = [f for f in builder.files if f.filename == filename][0]
    ctx = zmq.Context.instance()
    queue = ctx.socket(zmq.DEALER)
    queue.ipv6 = True
    queue.hwm = 10
    # NOTE: The following assumes that we're running on the master; this
    # *should* be the case (it's risky to run the importer on a tcp queue)
    # but there's no guarantee of this.
    queue.connect('tcp://localhost:5556')
    try:
        pkg.transfer(queue, 0)
    finally:
        queue.close()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号