[Erp5-dev] immediateReindexObject vs. reindexObject

Romain Courteaud romain at nexedi.com
Fri Mar 9 14:42:24 CET 2007


* Jacek Medrzycki [2007-03-09 14:29:21 +0100]:

> Hi

Hello,

> Correct me if I'm wrong - the immediateReindex and reindex differs so 
> that the first is - as name states - fired immediately, while the later 
> is fired throught activities. Is it correct?

Yes, you're right.
But it's forbidden to use the immediateReindexObject method.

> Using immediate reindex is considered to be coding crime. However, if my 
> previous statement is correct, we can use immediateReindex in scripts 
> that are to be called only throught activities, can't we? And if we use 
> reindex (not immediate) in such script, than the activities would be 
> fired twice - first time to call script, second time to call reindex. So 
> - is it better to use immediate reindex in scripts called throuht 
> activities?

The rule is: "Never use immediateReindexObject or
recursiveImmediateReindexObject", which includes ALL scripts, even the
one called throught activities.

Regards,
Romain



More information about the Erp5-dev mailing list