Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tamp_course_order
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭熊
tamp_course_order
Commits
e12d9142
Commit
e12d9142
authored
Dec 14, 2020
by
pengxiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉scoped_session
parent
8feebb2c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
engine.py
app/api/engine.py
+2
-2
No files found.
app/api/engine.py
View file @
e12d9142
...
...
@@ -97,7 +97,8 @@ class TAMP_SQL(object):
def
__init__
(
self
,
db_engine
):
# 创建DBSession类型:
self
.
DBSession
=
scoped_session
(
sessionmaker
(
bind
=
db_engine
))
# self.DBSession = scoped_session(sessionmaker(bind=db_engine))
self
.
DBSession
=
sessionmaker
(
bind
=
db_engine
)
self
.
session
=
self
.
DBSession
()
def
__enter__
(
self
):
...
...
@@ -109,5 +110,4 @@ class TAMP_SQL(object):
except
:
self
.
session
.
rollback
()
finally
:
self
.
DBSession
.
remove
()
self
.
session
.
close
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment