pgbouncer_info.py 文件源码

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

项目:ansible-pgbouncer 作者: alexey-medvedchikov 项目源码 文件源码
def get_stats():
  print "hit1"
  conn, cur = None, None
  stats = {}
  try:
    conn = psycopg2.connect(config['connection_string'])
    conn.set_isolation_level(ISOLATION_LEVEL_AUTOCOMMIT)
    cur = conn.cursor()
    stats = _get_stats(cur)
  finally:
    if cur is not None:
      cur.close()
      if conn is not None:
        conn.close()

  return stats
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号