Skip to content

Commit f0e3668

Browse files
committed
0.2.1 - fix example
Fix: Correct the `usage.py` where the instance path and the engine options are not configured properly.
1 parent 2e3f128 commit f0e3668

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
1. Fix: Remove unwanted printed information.
1212
2. Fix: Fix the typos in the docstrings.
13+
3. Fix: Correct the `usage.py` where the instance path and the engine options are not configured properly.
1314

1415
### 0.2.0 @ 12/13/2024
1516

usage.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class _Base(sa_orm.MappedAsDataclass, sa_orm.DeclarativeBase): ...
3333

3434
engine_options = {
3535
"connect_args": {"check_same_thread": False},
36-
"poolclass": 1,
36+
"poolclass": sa.pool.StaticPool,
3737
}
3838

3939

@@ -97,7 +97,10 @@ def __repr__(self):
9797
logger.setLevel(logging.INFO)
9898

9999
app = flask.Flask(
100-
__name__, instance_path=os.path.abspath(os.path.dirname(__file__))
100+
__name__,
101+
instance_path=os.path.abspath(
102+
os.path.join(os.path.dirname(__file__), "instance")
103+
),
101104
)
102105
app.config.update(
103106
{

0 commit comments

Comments
 (0)