updated Postgres Service

This commit is contained in:
2025-04-01 17:30:40 +03:00
parent 6b9e9050a2
commit 4c87c4df91
18 changed files with 745 additions and 368 deletions

View File

@@ -1,7 +1,7 @@
from contextlib import contextmanager
from functools import lru_cache
from typing import Generator
from config import postgres_configs
from Controllers.Postgres.config import postgres_configs
from sqlalchemy import create_engine
from sqlalchemy.orm import declarative_base, sessionmaker, scoped_session, Session
@@ -14,7 +14,7 @@ engine = create_engine(
max_overflow=5, # Reduced from 10 to prevent too many connections
pool_recycle=600, # Keep as is
pool_timeout=30, # Keep as is
echo=True, # Consider setting to False in production
echo=False, # Consider setting to False in production
)