romaninsh/queue

Queue implementation for Agile Toolkit

dev-master 2015-09-30 00:31 UTC

This package is auto-updated.

Last update: 2024-04-14 08:59:51 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.

Sample Screenshot

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:

https://www.youtube.com/watch?v=gXrq8af97GM