fixed pymongo connection issue

This commit is contained in:
Marvin Zhang
2019-05-09 19:43:02 +08:00
parent 8608664b9d
commit 7daf8d4c2a

View File

@@ -13,7 +13,7 @@ class DbManager(object):
"""
def __init__(self):
self.mongo = MongoClient(host=MONGO_HOST, port=MONGO_PORT)
self.mongo = MongoClient(host=MONGO_HOST, port=MONGO_PORT, connect=False)
self.db = self.mongo[MONGO_DB]
def save(self, col_name: str, item: dict, **kwargs) -> None: