processquery.py 文件源码

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

项目:tool 作者: PathDump 项目源码 文件源码
def execRequest (req, url):
    global results
    workers = []
    tree = req['tree']
    for child in tree['controller']['child']:
        t = Thread (target = wrapper, args = (httpcmd, (child, req, url),
                                              results))
        workers.append (t)

    for worker in workers:
        worker.start()
    for worker in workers:
        worker.join()

    data = []
    for res in results:
        resp, content = res
        if resp['status'] == '200':
            data += json.loads (content, object_hook=json_util.object_hook)

    results = []
    return json.dumps (data, default=json_util.default)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号