romaninsh / queue
Queue implementation for Agile Toolkit
Installs: 3 485
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.3
- atk4/atk4: >=4.2
This package is auto-updated.
Last update: 2024-11-14 10:22:53 UTC
README
This is an implementation of a simple queuing mechanism based on MySQL table. The goal of this implementation is to be simple and accessible to developer, for a high-performance queues look at alternatives.
Installing
You can install either from git or through composer. https://packagist.org/packages/romaninsh/queue. Refer to add-on installation documentation for Agile Toolkit.
Usage
- Import doc/queue.sql.
- Whenever you need to use queue:
$processor = $this->add('romaninsh/queue/Controller_QueueProcessor');
- call
$processor->schedule($model)
. This will schedule call to method$model->process
for each record in accessible set (respects conditions). - call
processor->process()
to reserve 5 (default) records from the queue and process them.
Demo Video
In-detail walkthrough is available here: