Tras mover el contenido de archivos a base64 in-band en el evento Redis, todo lo relacionado con el inbox local quedó muerto. Se elimina del contenedor y del config para reflejar fielmente que Quetzalcóatl no toca disco. - config.py: borra Settings.inbox_path - .env.example: borra INBOX_PATH - Dockerfile: borra mkdir /collina/inbox y su chown - coolify.yaml: borra volumen host:/var/collina/inbox y env INBOX_PATH - evolution.py docstring + manual-operativo: corrige el flujo descrito
47 lines
1.9 KiB
Python
47 lines
1.9 KiB
Python
"""Configuración de Quetzalcóatl."""
|
|
from __future__ import annotations
|
|
|
|
from functools import lru_cache
|
|
|
|
from pydantic import Field
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(
|
|
env_file=".env",
|
|
env_file_encoding="utf-8",
|
|
case_sensitive=False,
|
|
extra="ignore",
|
|
)
|
|
|
|
# ── Servicio ────────────────────────────────────────────────────────
|
|
service_name: str = "collina-quetzalcoatl"
|
|
service_version: str = "1.1.0"
|
|
deployment_env: str = "development"
|
|
log_level: str = "INFO"
|
|
log_json: bool = False
|
|
|
|
# ── Postgres ────────────────────────────────────────────────────────
|
|
postgres_url: str
|
|
|
|
# ── Redis y colas ───────────────────────────────────────────────────
|
|
redis_url: str
|
|
quetzalcoatl_director_queue: str = "quetzalcoatl-director-queue"
|
|
quetzalcoatl_envios_queue: str = "quetzalcoatl:envios"
|
|
|
|
# ── Evolution API ───────────────────────────────────────────────────
|
|
evolution_api_url: str
|
|
evolution_api_key: str
|
|
evolution_instance_name: str = "Quetzalcoatl"
|
|
evolution_instance_id: str = ""
|
|
director_phone_number: str = Field(...)
|
|
|
|
# ── Sesiones ────────────────────────────────────────────────────────
|
|
sesion_pausada_ttl_dias: int = 7
|
|
|
|
|
|
@lru_cache
|
|
def get_settings() -> Settings:
|
|
return Settings() # type: ignore[call-arg]
|