[email protected]
[Top] [All Lists]

[Zodb-checkins] SVN: ZODB/trunk/src/ZODB/DB.py Restore connectionDebugIn

Subject: [Zodb-checkins] SVN: ZODB/trunk/src/ZODB/DB.py Restore connectionDebugInfo().
From: Tim Peters
Date: Tue, 2 Nov 2004 16:30:06 -0500 EST
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):

_______________________________________________
Zodb-checkins mailing list
[email protected]
http://mail.zope.org/mailman/listinfo/zodb-checkins

<Prev in Thread] Current Thread [Next in Thread>
  • [Zodb-checkins] SVN: ZODB/trunk/src/ZODB/DB.py Restore connectionDebugInfo()., Tim Peters <=