Commit 4f90d69d authored by pengxiong's avatar pengxiong

数据库连接池

parent e82ba83f
......@@ -93,7 +93,7 @@ class TAMP_SQL(object):
def __init__(self, db_engine):
# 创建DBSession类型:
self.db_engine = db_engine.connect()
self.db_engine = db_engine
self.DBSession = scoped_session(sessionmaker(bind=self.db_engine))
self.session = self.DBSession()
......
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