diff --git a/Backend/db_access.py b/Backend/db_access.py index f0f3d93..bf97958 100644 --- a/Backend/db_access.py +++ b/Backend/db_access.py @@ -21,17 +21,15 @@ load_dotenv() app = Flask(__name__) -db_lock = 0 +# db_lock = 0 @app.before_request def db_connect(DB_URL=None): - if not db_lock: - # MongoDB connection - mongo_uri = DB_URL or os.environ.get("MONGO_URI") - connect(alias="default", host=mongo_uri) - db_lock = 1 - return True + # MongoDB connection + mongo_uri = DB_URL or os.environ.get("MONGO_URI") + connect(alias="default", host=mongo_uri) + return True class Response: