Integration package for zc.async allowing asynchronous operations in Plone
Latest commit 9a2146b Feb 25, 2016 nathan.vangheem committed with jensens add classifiers



Integration package for zc.async allowing asynchronous operations in Plone 3 and 4.



You will typically run in a ZEO environment, where you will have one or more worker instances carrying out jobs queued by your main zope instances.

For the sake of simplicity it is assumed that you have one instance that can queue new jobs, and one worker instance that consumes them, both operating on a single database. In this case your buildout configuration will look similar to the following:

recipe = plone.recipe.zope2zeoserver
file-storage = ${buildout:directory}/var/filestorage/Data.fs

recipe = plone.recipe.zope2instance
eggs = Plone
zcml =
zcml-additional =
    <include package="" file="single_db_instance.zcml" />
environment-vars =
    ZC_ASYNC_UUID ${buildout:directory}/var/instance-uuid.txt

recipe = plone.recipe.zope2instance
eggs = ${instance:eggs}
zcml = ${instance:zcml}
zcml-additional =
    <include package="" file="single_db_worker.zcml" />
environment-vars =
    ZC_ASYNC_UUID ${buildout:directory}/var/worker-uuid.txt

There are two important stanzas here:

  • Each instance has to set the ZC_ASYNC_UUID environment variable in order to integrate properly with zc.async.
  • Each instance loads the single_db_instance.zcml configuration. The worker instance loads the single_db_worker.zcml configuration in order to setup the queue and configure itself as a dispatcher.

For more details please look at the example buildout configurations included in the package.

Plone 3


Plone 4

Use five.intid


Code from Enfold's plone.async.core package has been used for setting up the queues.