[Zope] Problem with constructTransientObjectContainer - Resolved
Jonathan
dev101 at magma.ca
Tue Jun 20 11:52:23 EDT 2006
----- Original Message -----
From: "Chris McDonough" <chrism at plope.com>
> folder.manage_addProducts ['Transience'].constructTransientObjectContainer
> might work (assuming "constructTransientObjectContainer" is the right
> constructor name, I didn't check).
Chris, thanks for the idea - I tried it, but it generated the error:
BadRequest: ('Empty or invalid id specified', <Folder at /Coz/WUI>)
After looking at the Transience.py source I found the answer: Instead of
passing 'self' as the first parameter I passed the folder object instead.
The worked because constructTransientObjectContainer does:
self._setObject(id, ob)
So the final solution was:
folder = self.restrictedTraverse('Coz/TempImages')
constructTransientObjectContainer(folder, 'GarbageCollector',
timeout_mins=10, limit=0,
delNotification=BASEFOLDER+'DeleteTempImage')
Thanks again for the help, it got me thinking in the right direction!
Jonathan
More information about the Zope
mailing list