entidi2608 commited on
Commit
43e11ef
·
1 Parent(s): 5b29589
Files changed (1) hide show
  1. db/mongoDB.py +2 -2
db/mongoDB.py CHANGED
@@ -36,8 +36,8 @@ async def connect_to_mongo():
36
  logger.info(f"🔸 Connecting to MongoDB Atlas...")
37
 
38
  if not config.MONGODB_CLOUD_URI or not config.DB_NAME:
39
- logger.error("❌ MONGO_URI hoặc MONGO_DB_NAME chưa được thiết lập trong biến môi trường.")
40
- raise ConfigurationError("MONGO_URI and MONGO_DB_NAME must be set.")
41
 
42
  try:
43
  # 1. Khởi tạo client bất đồng bộ
 
36
  logger.info(f"🔸 Connecting to MongoDB Atlas...")
37
 
38
  if not config.MONGODB_CLOUD_URI or not config.DB_NAME:
39
+ logger.error("❌ MONGODB_CLOUD_URI hoặc DB_NAME chưa được thiết lập trong biến môi trường.")
40
+ raise ConfigurationError("MONGODB_CLOUD_URI and DB_NAME must be set.")
41
 
42
  try:
43
  # 1. Khởi tạo client bất đồng bộ