-
long running tasks
last modified April 25 by stonor
This page collects notes on the investigation into dealing with long running tasks done during the Paris Plone Sprint.
Looking into existing solutions
| zc.async | lovely.remotetask | CMFActivity
|
clockserver | |
| Documentation
|
|
|
|
|
| Runs on...
|
Written for Zope 3. Tests passes on Zope 2.11 (not earlier versions). Don't know yet if it is possible to run it reliable on Z2.
|
Written for Zope 3. There is a branch for Zope 2.9 that works. |
|
|
| How to create a job/task
|
A job is a method with potential parameters. The method can live in code or be called on an object persistent in the ZODB. The method is wrapped in a class with additional attributes on e.g. execution time and status and a link til to ZODB object. On Zope 2 it does not work with any persistent object. There is a limitation in what objects that twisted is capable of handling even though the zc.twist package adds some kind of Zope support to Twisted.
|
|
||
| What and how is job executed
|
Creates an additional worker thread at startup. twisted polls the queue regulary and executes the job. (or actually an "agent" is responsible for selecting what jobs in the queue to handle and a twisted dispatcher actually runs it.
|
|
||
|
|