findrobots_par.py 文件源码

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

项目:python-cookbook-3rd 作者: tuanavu 项目源码 文件源码
def find_all_robots(logdir):
    '''
    Find all hosts across and entire sequence of files
    '''
    files = glob.glob(logdir+"/*.log.gz")
    all_robots = set()
    with futures.ProcessPoolExecutor() as pool:
        for robots in pool.map(find_robots, files):
            all_robots.update(robots)
    return all_robots
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号