Commit f1fa5efc authored by Grégory Wisniewski's avatar Grégory Wisniewski

Naive implementation of lastTransaction().

This API method seems used only in ZODB tests framework.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1806 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 3e806bc6
...@@ -957,6 +957,11 @@ class Application(object): ...@@ -957,6 +957,11 @@ class Application(object):
def iterator(self, start=None, stop=None): def iterator(self, start=None, stop=None):
return Iterator(self, start, stop) return Iterator(self, start, stop)
def lastTransaction(self):
# XXX: this doesn't consider transactions created by other clients,
# should ask the primary master
return self.local_var.tid
def __del__(self): def __del__(self):
"""Clear all connection.""" """Clear all connection."""
# Due to bug in ZODB, close is not always called when shutting # Due to bug in ZODB, close is not always called when shutting
......
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