Commit 16ef5dc5 authored by Jim Fulton's avatar Jim Fulton

Added a method to get debugging info.

parent a2ccfe68
...@@ -84,14 +84,15 @@ ...@@ -84,14 +84,15 @@
############################################################################## ##############################################################################
"""Database objects """Database objects
$Id: DB.py,v 1.13 1999/08/16 13:54:14 jim Exp $""" $Id: DB.py,v 1.14 1999/08/25 17:36:02 jim Exp $"""
__version__='$Revision: 1.13 $'[11:-2] __version__='$Revision: 1.14 $'[11:-2]
import cPickle, cStringIO, sys, POSException import cPickle, cStringIO, sys, POSException
from Connection import Connection from Connection import Connection
from bpthread import allocate_lock from bpthread import allocate_lock
from Transaction import Transaction from Transaction import Transaction
from referencesf import referencesf from referencesf import referencesf
from time import ctime
StringType=type('') StringType=type('')
...@@ -488,6 +489,18 @@ class DB: ...@@ -488,6 +489,18 @@ class DB:
return c return c
finally: self._r() finally: self._r()
def connectionDebugInfo(self):
r=[]
pools,pooll=self._pools
for version, (pool, allocated, lock) in pools.items():
for c in allocated:
r.append({
'opened': c._opened and ctime(c._opened),
'info': c._debug_info,
'version': version,
})
return r
def pack(self, t): def pack(self, t):
self._storage.pack(t,referencesf) self._storage.pack(t,referencesf)
......
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