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
d00ce21d
Commit
d00ce21d
authored
4 years ago
by
etscript
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加课程包
parent
31416e2e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
14 deletions
+51
-14
engine.py
app/api/engine.py
+16
-0
order_service.py
app/service/order_service.py
+35
-14
No files found.
app/api/engine.py
View file @
d00ce21d
...
@@ -70,6 +70,22 @@ tamp_zhibo_engine = create_engine(
...
@@ -70,6 +70,22 @@ tamp_zhibo_engine = create_engine(
# pool_recycle=60
# pool_recycle=60
)
)
tamp_course_engine
=
create_engine
(
'mysql+pymysql://{user}:{password}@{host}:{port}/{db}?charset={charset}'
.
format
(
db
=
config
[
env
][
'MySQL'
][
'tamp_course_db'
],
host
=
config
[
env
][
'MySQL'
][
'host'
],
port
=
config
[
env
][
'MySQL'
][
'port'
],
user
=
config
[
env
][
'MySQL'
][
'user'
],
password
=
config
[
env
][
'MySQL'
][
'password'
],
charset
=
"utf8"
),
poolclass
=
NullPool
# max_overflow=0, # 超过连接池大小外最多创建的连接
# pool_size=10, # 连接池大小
# pool_timeout=5,
# pool_recycle=60
)
redis
=
redis
.
Redis
(
redis
=
redis
.
Redis
(
host
=
config
[
env
][
'redis'
][
'host'
],
host
=
config
[
env
][
'redis'
][
'host'
],
port
=
config
[
env
][
'redis'
][
'port'
],
port
=
config
[
env
][
'redis'
][
'port'
],
...
...
This diff is collapsed.
Click to expand it.
app/service/order_service.py
View file @
d00ce21d
This diff is collapsed.
Click to expand it.
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