Manage Python Multiprocessing with MongoDB
问题 I'm trying to run my code with a multiprocessing function but mongo keep returning "MongoClient opened before fork. Create MongoClient with connect=False, or create client after forking." I really doesn't understand how i can adapt my code to this. Basically the structure is: db = MongoClient().database db.authenticate('user', 'password', mechanism='SCRAM-SHA-1') collectionW = db['words'] collectionT = db['sinMemo'] collectionL = db['sinLogic'] def findW(word): rows = collectionw.find({"word"