[Zope] CMFBTreeFolder Behavior

David Pratt fairwinds at eastlink.ca
Mon Feb 28 09:07:48 EST 2005


Hi.  I am working with the CMFBTreeFolder for the first time. I thought 
it would make sense since I am wanting to use this type for an uploads 
folder.  There may be thousands of objects.  Once files have been 
uploaded to the folder, I am running a script to pull out images using 
a for statement like this:

	# Iterate over folder contents
	for name, obj in start_dir.objectItems(['Portal Image']):
		
and then executing some logic on the images afterwards.  I am planning 
to cron the script unless I can figure a way to execute the logic as 
files are coming into the folder (which would be the best - so any 
ideas here would be great).

In any case, what happens is that about half the objects get processed 
with each run of the script.  For example if I had 1030 objects about 
half gets processed, and then half of that and so on.  I may take 4 
runs to get everything processed in the folder.  On a normal Folder or 
CMF Portal Folder, all objects get processed in one run.

Maybe this is what it is supposed to do and I should loop my logic and 
test each time or something.  Can someone give me some insight on this. 
Is  this normal ? Or should I be using anything else to process all 
objects of a certain type in my BTreeFolder (so I know I am getting 
them all) on one pass.

Regards,
David



More information about the Zope mailing list