forked from innovacion/Mayacontigo
add healthcheck to remaining apps
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
from hvac import Client
|
||||
from pydantic import Field
|
||||
from dotenv import load_dotenv
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
|
||||
client = Client(url="https://vault.ia-innovacion.work")
|
||||
|
||||
if not client.is_authenticated():
|
||||
@@ -14,6 +12,7 @@ secret_map = client.secrets.kv.v2.read_secret_version(
|
||||
)["data"]["data"]
|
||||
|
||||
class Settings(BaseSettings):
|
||||
|
||||
"""
|
||||
Esta clase obtiene sus valores de variables de ambiente.
|
||||
Si no estan en el ambiente, los jala de nuestra Vault.
|
||||
@@ -39,11 +38,10 @@ class Settings(BaseSettings):
|
||||
async def init_mongo_db(self):
|
||||
"""Este helper inicia la conexion enter el MongoDB ORM y nuestra instancia"""
|
||||
|
||||
from banortegpt.database.mongo_memory.models import Conversation
|
||||
from beanie import init_beanie
|
||||
from motor.motor_asyncio import AsyncIOMotorClient
|
||||
|
||||
from banortegpt.database.mongo_memory.models import Conversation
|
||||
|
||||
await init_beanie(
|
||||
database=AsyncIOMotorClient(self.mongodb_url).voz_del_cliente,
|
||||
document_models=[Conversation],
|
||||
|
||||
Reference in New Issue
Block a user