Commit f2610957 authored by shenshuo's avatar shenshuo

更新db context

parent fbae0cde
...@@ -28,7 +28,7 @@ def init_engine(**settings): ...@@ -28,7 +28,7 @@ def init_engine(**settings):
dbname = db_conf[const.DBNAME_KEY] dbname = db_conf[const.DBNAME_KEY]
engine = create_engine('mysql+pymysql://{user}:{pwd}@{host}:{port}/{dbname}?charset=utf8' engine = create_engine('mysql+pymysql://{user}:{pwd}@{host}:{port}/{dbname}?charset=utf8'
.format(user=dbuser, pwd=quote_plus(dbpwd), host=dbhost, port=dbport, dbname=dbname), .format(user=dbuser, pwd=quote_plus(dbpwd), host=dbhost, port=dbport, dbname=dbname),
logging_name=dbkey, pool_size=100, pool_timeout=120) logging_name=dbkey, pool_size=20, pool_timeout=120)
engines[dbkey] = engine engines[dbkey] = engine
......
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