Make prioritizations in the queue via filtering hooks
By default the publishing queue is first in, first out, and every publication goes through it. Three extension points change that, all configured in content.ini [PublishingSettings]:
| Extension point | Setting | Use it to |
|---|---|---|
| Filters | AsynchronousPublishingFilters[] | Keep some objects out of the queue: they are published at once, in the editor's request |
| preQueue hooks | AsynchronousPublishingPreQueueHooks[] | Run code just before a draft is queued, for example to record a priority |
| postHandling hooks | AsynchronousPublishingPostHandlingHooks[] | Run code after the daemon has handled a draft, for example to clean up what a preQueue hook recorded |
| The queue reader | AsynchronousPublishingQueueReader | Decide which queued draft the daemon takes next |
Filters are called one after the other; the first that rejects an object stops the others, and the object is published synchronously. Hooks use the signal slots of Zeta Components (ezcSignalCollection): any number can be connected to a signal, and they are called in the order they were connected.
Example: imports without blocking editors
A site imports thousands of objects every night, and editors publish during the day. With a plain queue, an editor's article waits behind the import. A preQueue hook can record which drafts come from the import, and a queue reader can take the editors' drafts first; a postHandling hook removes the record once a draft is done. Or a filter can keep the import out of the queue altogether.
See Hooks for the details of each extension point.
In this section
Contributors
- Geir Arne Waaler
- Graham Brookins Updated Maintainer
Comments
Add a comment