コード例 #1
0
ファイル: scalrr.py プロジェクト: esoroush/scalrr
def before_request():
    """Make sure we are connected to the database each request."""
    if DEFAULT_DB == SCIDB:
    	sdbi.scidbOpenConn()
    else:
    	mdbi.mysqlOpenConn()
コード例 #2
0
ファイル: scalrr.py プロジェクト: esoroush/scalrr
def teardown_request(exception):
    """Closes the database again at the end of the request."""
    if DEFAULT_DB == SCIDB:
    	sdbi.scidbCloseConn()
    else:
    	mdbi.mysqlOpenConn()
コード例 #3
0
ファイル: scalrr_back.py プロジェクト: leibatt/scalrr
def dbclose():
    """Closes the database again at the end of the request."""
    if DEFAULT_DB == SCIDB:
    	sdbi.scidbCloseConn()
    else:
    	mdbi.mysqlOpenConn()