Updated claude big changes
This commit is contained in:
@@ -17,7 +17,13 @@ url = URL.create(
|
||||
port=ApplicationConfig.POSTGRES_PORT
|
||||
)
|
||||
|
||||
engine = create_engine(url)
|
||||
engine = create_engine(
|
||||
url,
|
||||
pool_pre_ping=True, # Verify connections before use
|
||||
pool_size=5, # Maintain 5 connections in pool
|
||||
max_overflow=10, # Allow 10 additional connections when busy
|
||||
pool_recycle=3600, # Recycle connections after 1 hour
|
||||
)
|
||||
|
||||
Session = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
||||
session = Session()
|
||||
|
||||
Reference in New Issue
Block a user