MetaController.py 文件源码

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

项目:codex-backend 作者: codexgigassys 项目源码 文件源码
def writeImportsTree(self, imports):
        command = {"$inc": {"count": 1}}
        bulk = self.import_coll.initialize_unordered_bulk_op()
        execute_bool = False
        for i in imports:
            dll_name = i["lib"]
            funcs = i["functions"]
            for imp_name in funcs:
                execute_bool = True
                bulk.find({"function_name": imp_name.lower(),
                           "dll_name": dll_name.lower()}).upsert().update(command)
                # print("**** Error Imports Tree ****")
                # err=str(traceback.format_exc())
                # print(err)
                # return -1
        try:
            if(execute_bool):
                bulk.execute({'w': 0})
        except BulkWriteError:
            logging.exception("MetaController(): " +
                              str("**** Error Imports Tree ****"))
            # err=str(traceback.format_exc())
            # print(err)
            return -1
        return 0
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号