Made persistency for logs and reduced retry delay for email

This commit is contained in:
Fanilo-Nantenaina 2025-12-30 08:54:43 +03:00
parent ab062747cb
commit 7fccf95ed9
3 changed files with 3 additions and 2 deletions

2
api.py
View file

@ -80,7 +80,7 @@ from utils.normalization import normaliser_type_tiers
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
handlers=[logging.FileHandler("sage_api.log"), logging.StreamHandler()],
handlers=[logging.FileHandler("/app/logs/sage_api.log"), logging.StreamHandler()],
)
logger = logging.getLogger(__name__)

View file

@ -49,7 +49,7 @@ class Settings(BaseSettings):
# === Email Queue ===
max_email_workers: int = 3
max_retry_attempts: int = 3
retry_delay_seconds: int = 60
retry_delay_seconds: int = 3
# === CORS ===
cors_origins: List[str] = ["*"]

View file

@ -5,6 +5,7 @@ services:
env_file: .env
volumes:
- ./data:/app/data
- ./logs:/app/logs
ports:
- "8000:8000"
restart: unless-stopped