SIENTIAPDE-1107

feat: add MongoDB integration and update configuration for activities
This commit is contained in:
vitor-aignosi
2025-06-16 12:05:56 -03:00
parent 2db8435a42
commit a4e4d3b085
8 changed files with 308 additions and 14 deletions

View File

@@ -1,5 +1,8 @@
from os import getenv
from debugpy import connect
from matplotlib.pylab import f
def build_redis_config():
return {
@@ -10,6 +13,18 @@ def build_redis_config():
}
def build_mongodb_config():
username = getenv('MONGODB_USERNAME', 'sientia')
password = getenv('MONGODB_PASSWORD', 'sientia')
uri = getenv('MONGODB_URL', 'localhost:27017')
connection_string = f'mongodb://{username}:{password}@{uri}'
return {
'connection_string': connection_string,
'database_name': getenv('MONGODB_DATABASE_NAME', 'sientia')
}
def build_couchbase_config():
return {
'connection_string': getenv('COUCHBASE_CONNECTION_STRING', 'couchbase://localhost'),