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
cec7c4b7
Commit
cec7c4b7
authored
Dec 01, 2020
by
pengxiong@wealthgrow.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
连接池
parent
4c93d804
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
engine.py
app/api/engine.py
+2
-6
No files found.
app/api/engine.py
View file @
cec7c4b7
...
@@ -32,9 +32,7 @@ tamp_user_engine = create_engine(
...
@@ -32,9 +32,7 @@ tamp_user_engine = create_engine(
charset
=
"utf8"
charset
=
"utf8"
),
),
max_overflow
=
0
,
# 超过连接池大小外最多创建的连接
max_overflow
=
0
,
# 超过连接池大小外最多创建的连接
pool_size
=
100
,
# 连接池大小
pool_size
=
100
# 连接池大小
pool_timeout
=
30
,
# 池中没有线程最多等待的时间,否则报错
pool_recycle
=-
1
# 多久之后对线程池中的线程进行一次连接的回收(重置)
)
)
tamp_pay_engine
=
create_engine
(
tamp_pay_engine
=
create_engine
(
'mysql+pymysql://{user}:{password}@{host}:{port}/{db}?charset={charset}'
.
format
(
'mysql+pymysql://{user}:{password}@{host}:{port}/{db}?charset={charset}'
.
format
(
...
@@ -45,9 +43,7 @@ tamp_pay_engine = create_engine(
...
@@ -45,9 +43,7 @@ tamp_pay_engine = create_engine(
password
=
config
[
env
][
'MySQL'
][
'password'
],
password
=
config
[
env
][
'MySQL'
][
'password'
],
charset
=
"utf8"
),
charset
=
"utf8"
),
max_overflow
=
0
,
# 超过连接池大小外最多创建的连接
max_overflow
=
0
,
# 超过连接池大小外最多创建的连接
pool_size
=
100
,
# 连接池大小
pool_size
=
100
# 连接池大小
pool_timeout
=
30
,
# 池中没有线程最多等待的时间,否则报错
pool_recycle
=-
1
# 多久之后对线程池中的线程进行一次连接的回收(重置)
)
)
redis
=
redis
.
Redis
(
redis
=
redis
.
Redis
(
...
...
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