STABLE: Final schema sync, optimized gitignore

This commit is contained in:
Kincses
2026-02-26 08:19:25 +01:00
parent 893f39fa15
commit 505543330a
203 changed files with 11590 additions and 9542 deletions

View File

@@ -7,7 +7,8 @@ import base64
import httpx
from typing import Dict, Any, Optional, List
from sqlalchemy import select
from app.db.session import SessionLocal
# JAVÍTVA: AsyncSessionLocal használata
from app.db.session import AsyncSessionLocal
from app.models.system import SystemParameter
logger = logging.getLogger("AI-Service")
@@ -21,7 +22,8 @@ class AIService:
@classmethod
async def get_config_delay(cls) -> float:
try:
async with SessionLocal() as db:
# JAVÍTVA: Aszinkron session kezelés
async with AsyncSessionLocal() as db:
stmt = select(SystemParameter).where(SystemParameter.key == "AI_REQUEST_DELAY")
res = await db.execute(stmt)
param = res.scalar_one_or_none()