示例#1
0
def _db_close(exc):
    if not db.is_closed():
        db.close()
示例#2
0
 def process_response(self, req, res, resource):
     if not db.is_closed():
         db.close()
示例#3
0
def _db_connect():
    if db.is_closed():
        db.connect()
示例#4
0
 def before():
     if db_proxy.is_closed():
         db_proxy.connect()
示例#5
0
 def _db_close(exc):
     if not db_proxy.is_closed():
         db_proxy.close()
示例#6
0
 def on_finish(self):
     if not db.is_closed():
         db.close()
     return super(BaseHandler, self).on_finish()
示例#7
0
def close_db(__):
    if not db.is_closed():
        db.close()
示例#8
0
def _db_close(exc):
    if not db.is_closed():
        db.close()
示例#9
0
def close_db(pad):
    if not db.is_closed():
        db.close()
示例#10
0
def connect_db():
    if db.is_closed():
        db.connect()
示例#11
0
文件: app.py 项目: skykery/house-api
def _db_close(exc):
    if not database.is_closed():
        database.close()
示例#12
0
def disconnect_db(exc):
    from models import db
    if not db.is_closed():
        db.close()