Loading db/db.py +5 −0 Original line number Diff line number Diff line Loading @@ -2,8 +2,12 @@ from pymongo import MongoClient from config import Config from bson.codec_options import CodecOptions import os import logging logger = logging.getLogger(__name__) # the __name__ resolve to "uicheckapp.services" # This will load the uicheckapp logger class MongoDatabse(): def __init__(self): Loading @@ -30,6 +34,7 @@ class MongoDatabse(): f"An exception occurred while deleting collection {name}: {e}") def __connect(self): logger.info(os.getenv('CAPIF_MONGO_USER') + ":" + os.getenv('CAPIF_MONGO_PASSWORD')) uri = "mongodb://" + os.getenv('CAPIF_MONGO_USER') + ":" + os.getenv('CAPIF_MONGO_PASSWORD') + \ "@" + os.getenv('CAPIF_MONGO_HOSTNAME') + \ ":" + os.getenv('CAPIF_MONGO_PORT') Loading Loading
db/db.py +5 −0 Original line number Diff line number Diff line Loading @@ -2,8 +2,12 @@ from pymongo import MongoClient from config import Config from bson.codec_options import CodecOptions import os import logging logger = logging.getLogger(__name__) # the __name__ resolve to "uicheckapp.services" # This will load the uicheckapp logger class MongoDatabse(): def __init__(self): Loading @@ -30,6 +34,7 @@ class MongoDatabse(): f"An exception occurred while deleting collection {name}: {e}") def __connect(self): logger.info(os.getenv('CAPIF_MONGO_USER') + ":" + os.getenv('CAPIF_MONGO_PASSWORD')) uri = "mongodb://" + os.getenv('CAPIF_MONGO_USER') + ":" + os.getenv('CAPIF_MONGO_PASSWORD') + \ "@" + os.getenv('CAPIF_MONGO_HOSTNAME') + \ ":" + os.getenv('CAPIF_MONGO_PORT') Loading