SIENTIAPDE-1107
feat: add MongoDB integration and update configuration for activities
This commit is contained in:
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user