连接池

parent e3fb1628
...@@ -32,7 +32,9 @@ tamp_user_engine = create_engine( ...@@ -32,7 +32,9 @@ tamp_user_engine = create_engine(
charset="utf8" charset="utf8"
), ),
max_overflow=0, # 超过连接池大小外最多创建的连接 max_overflow=0, # 超过连接池大小外最多创建的连接
pool_size=100 # 连接池大小 pool_size=100, # 连接池大小
pool_timeout=5,
pool_recycle=1800
) )
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(
...@@ -43,7 +45,9 @@ tamp_pay_engine = create_engine( ...@@ -43,7 +45,9 @@ 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=5,
pool_recycle=1800
) )
redis = redis.Redis( redis = redis.Redis(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment