Commit 3b6750b0 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Add the callback "sync" for Connection.

git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@225 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 483668df
...@@ -187,4 +187,6 @@ class Storage(BaseStorage.BaseStorage, ...@@ -187,4 +187,6 @@ class Storage(BaseStorage.BaseStorage,
def history(self, oid, version, length=1, filter=None): def history(self, oid, version, length=1, filter=None):
return self.app.history(oid, version, length, filter) return self.app.history(oid, version, length, filter)
def sync(self):
self.app.sync()
...@@ -877,3 +877,6 @@ class Application(object): ...@@ -877,3 +877,6 @@ class Application(object):
for conn in self.em.getConnectionList(): for conn in self.em.getConnectionList():
conn.close() conn.close()
close = __del__ close = __del__
def sync(self):
self._waitMessage()
...@@ -397,9 +397,11 @@ class ClientEventHandler(EventHandler): ...@@ -397,9 +397,11 @@ class ClientEventHandler(EventHandler):
# ZODB required a dict with oid as key, so create it # ZODB required a dict with oid as key, so create it
oids = {} oids = {}
for oid in oid_list: for oid in oid_list:
oids[oid] = 1 oids[oid] = tid
if app.mq_cache.has_key(oid): try:
del app.mq_cache[oid] del app.mq_cache[oid]
except KeyError:
pass
if app._db is not None: if app._db is not None:
app._db.invalidate(tid, oids) app._db.invalidate(tid, oids)
finally: finally:
......
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