1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

чиним билд114

This commit is contained in:
MoonTestUse1
2025-01-02 01:15:03 +06:00
parent 2c3d722f57
commit 660cbfeedb
5 changed files with 17 additions and 10 deletions

View File

@@ -8,9 +8,14 @@ SQLALCHEMY_DATABASE_URL = os.getenv(
"DATABASE_URL", "postgresql://postgres:postgres123@postgres:5432/support_db"
)
engine = create_engine(SQLALCHEMY_DATABASE_URL)
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
engine = create_engine(
SQLALCHEMY_DATABASE_URL,
pool_pre_ping=True,
pool_size=5,
max_overflow=10
)
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
Base = declarative_base()
def get_db():