conn_timout = 10
def __init__(self, logger_name="db", lock=False):
- super().__init__(logger_name, lock)
+ super().__init__(logger_name=logger_name, lock=lock)
self.client = None
self.db = None
self.database_key = None
self.client = MongoClient(
config["uri"], replicaSet=config.get("replicaset", None)
)
- else:
- self.client = MongoClient(
- config["host"],
- config["port"],
- replicaSet=config.get("replicaset", None),
- )
- # TODO add as parameters also username=config.get("user"), password=config.get("password"))
# when all modules are ready
self.db = self.client[config["name"]]
if "loglevel" in config: