STABLE: Final schema sync, optimized gitignore
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user