Commit 34e45ae7 authored by Tim Peters's avatar Tim Peters

Restore connectionDebugInfo().

This can't use self._connectionMap, because it needs to
know the version associated with each connection.
parent 573596a9
......@@ -562,23 +562,22 @@ class DB(object):
def connectionDebugInfo(self):
result = []
t = time()
def f(c):
o = c._opened
d = c._debug_info
if d:
if len(d) == 1:
d = d[0]
else:
d = ''
d = "%s (%s)" % (d, len(c._cache))
result.append({
'opened': o and ("%s (%.2fs)" % (ctime(o), t-o)),
'info': d,
'version': version,
})
for version, pool in self._pools.items():
for c in pool.all_as_list():
o = c._opened
d = c._debug_info
if d:
if len(d) == 1:
d = d[0]
else:
d = ''
d = "%s (%s)" % (d, len(c._cache))
self._connectionMap(f)
result.append({
'opened': o and ("%s (%.2fs)" % (ctime(o), t-o)),
'info': d,
'version': version,
})
return result
def getActivityMonitor(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment