Update modules/database.py
Browse files- modules/database.py +7 -0
modules/database.py
CHANGED
|
@@ -29,6 +29,13 @@ mongo_db = None
|
|
| 29 |
analysis_collection = None
|
| 30 |
chat_collection = None # Nueva variable global
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
#####################################################################################33
|
| 33 |
def initialize_cosmos_sql_connection():
|
| 34 |
global cosmos_client, user_database, user_container, application_requests_container
|
|
|
|
| 29 |
analysis_collection = None
|
| 30 |
chat_collection = None # Nueva variable global
|
| 31 |
|
| 32 |
+
|
| 33 |
+
#####################################################################################33
|
| 34 |
+
def initialize_database_connections():
|
| 35 |
+
mongodb_success = initialize_mongodb_connection()
|
| 36 |
+
sql_success = initialize_cosmos_sql_connection()
|
| 37 |
+
return mongodb_success and sql_success
|
| 38 |
+
|
| 39 |
#####################################################################################33
|
| 40 |
def initialize_cosmos_sql_connection():
|
| 41 |
global cosmos_client, user_database, user_container, application_requests_container
|