projects / org / se7enxweb / mugo_queue
Find the Exponential Software extensions you want
UNIX name | Owner | Status |
---|---|---|
mugo_queue | 7x | stable |
Version | Compatible with |
---|---|
N/A | N/A |
It's a framework to handle a queue of tasks.
An example: You'd like to rebuild the eZ Find search index for all Article objects.
To re-index all articles, you add multiple tasks into the queue. With this framework, you can also
develop a task that can re-index a single article. Another process would fetch "re-index" tasks from
the queue, execute them, and then remove them if the execution was successful.
The framework comes with a script to add tasks to the queue or to execute tasks from the queue.
The task is an abstract class. To implement a concrete task, you need to implement 2 methods:
enable the extension -- for example in settings/override/site.ini.append.php
Add this line:
ActiveExtensions[]=mugo_queue
under the block '[ExtensionSettings]'
The end result is the same: a simple eZ Publish script can rebuild the eZ Find search index
for all Article objects - and so can Mugo Queue.
Mugo Queue requires you to divide the process into 2 steps:
You can interupt a normal script at any time and restart it from scratch. With Mugo Queue
you have the option to continue at the point where you interrupted the script (with remaining
tasks in the queue).
You'd need to learn how to write a task class but you don't have to learn how to
implement a complete eZ Publish script or cronjob.
Mugo Queue supports multiple threads to process tasks from the queue.
Because of the 2 step process, you can collect tasks during the day and execute
the tasks at night (or at other low traffic times).
The Mugo Queue framework enables you to execute tasks not only from the command line
context but also in the context of a normal Apache request.