def teardown_db(conn_pool):
    db = g.pop('db', None)
    if (db is not None):
        conn_pool.put(db)
def teardown_db(conn_pool):
    db = g.pop('db', None)
    if (db is not None):
        conn_pool.put(db)