bucket.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:sopel-modules 作者: phixion 项目源码 文件源码
def ping_connection(dbapi_connection, connection_record, connection_proxy):
    cursor = dbapi_connection.cursor()
    try:
        cursor.execute("SELECT 1")
    except:
        # optional - dispose the whole pool
        # instead of invalidating one at a time
        # connection_proxy._pool.dispose()

        # raise DisconnectionError - pool will try
        # connecting again up to three times before raising.
        raise exc.DisconnectionError()
    cursor.close()

# Define Bucket Items
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号