Skip to content

Commit 574a549

Browse files
authored
Merge pull request #28 from crane-cloud/ft-add-pool-limit
feat: add database pool limits
2 parents 7c9430e + 1106e78 commit 574a549

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/prod.yml

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
- released
88
- prereleased
99

10-
1110
jobs:
1211
build:
1312
outputs:

app/database.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
create_database(DATABASE_URI)
1515

1616

17-
engine = create_engine(DATABASE_URI, pool_pre_ping=True)
17+
engine = create_engine(DATABASE_URI, pool_pre_ping=True,
18+
pool_size=10, max_overflow=20)
1819

1920
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
2021

0 commit comments

Comments
 (0)