[ZODB-Dev] ZEO pack
Greg Ward
gward@mems-exchange.org
Wed, 26 Sep 2001 10:29:11 -0400
On 26 September 2001, Steve Alexander said:
> t=time.time()-days*86400
> db=self._p_jar.db()
> db.pack(t)
Not quite -- as I just mentioned, DB.pack() doesn't know about
ClientStorage.pack()'s 'wait' argument. Try this instead:
from ZEO.ClientStorage import ClientStorage
from ZODB.referencesf import referencesf
[...]
t=time.time()-days*86400
db=self._p_jar.db()
storage=db._storage
if isinstance(storage, ClientStorage):
storage.pack(t, referencesf, wait=1)
else:
storage.pack(t, referencesf)
Greg
--
Greg Ward - software developer gward@mems-exchange.org
MEMS Exchange http://www.mems-exchange.org