[Grok-dev] Re: Triggering recurring events and executing tasks in the "background"

Malthe Borch mborch at gmail.com
Thu Apr 10 07:51:03 EDT 2008

On 10/04/2008, Gary Poster <gary at zope.com> wrote:
>  Now the job that will be performed asynchronously will be to call
>  Zope.Products.MyProduct.perform_index(catalog)

Okay I see. Does the package then acquire a fresh copy of the
``catalog``-instance, local to its own ZODB connection or is there
some trickery involved?

The reason I'm asking is that doing this kind of async operation means
that the async thread would have to pull in local copies (in the
object cache) for any objects under its microscope.

To avoid this, I've taken a slightly different approach (which might
not work in all environments), to simply do the require processing
after the request ends, but in the same thread.

Obviously this will occupy that thread while its processing, which
will cause problems in certain scenarios.


More information about the Grok-dev mailing list