[Zodb-checkins] SVN: ZODB/trunk/src/ZODB/DB.py Restore
connectionDebugInfo().
Tim Peters
tim.one at comcast.net
Tue Nov 2 16:30:06 EST 2004
Log message for revision 28327:
Restore connectionDebugInfo().
This can't use self._connectionMap, because it needs to
know the version associated with each connection.
Changed:
U ZODB/trunk/src/ZODB/DB.py
-=-
Modified: ZODB/trunk/src/ZODB/DB.py
===================================================================
--- ZODB/trunk/src/ZODB/DB.py 2004-11-02 19:47:26 UTC (rev 28326)
+++ ZODB/trunk/src/ZODB/DB.py 2004-11-02 21:30:05 UTC (rev 28327)
@@ -562,23 +562,22 @@
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))
+ 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))
- result.append({
- 'opened': o and ("%s (%.2fs)" % (ctime(o), t-o)),
- 'info': d,
- 'version': version,
- })
-
- self._connectionMap(f)
+ result.append({
+ 'opened': o and ("%s (%.2fs)" % (ctime(o), t-o)),
+ 'info': d,
+ 'version': version,
+ })
return result
def getActivityMonitor(self):
More information about the Zodb-checkins
mailing list