2017 © Pedro Peláez
 

library queue-manager

Callables queue manager

image

arko/queue-manager

Callables queue manager

  • Friday, June 26, 2015
  • by lemark
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2,872 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 14 % Grown

The README.md

QueueManagerBundle

Installation

Install it using composer:, (*1)

``` bash composer.phar require arko/queue-manager "dev-master", (*2)


## How to use Generally speaking, this component is designed to be used in a singleton style. Supposed that the QueueManager (or any class implementing the QueueManagerInterface) instance will be created once and retrieved later using some DIC like Symfony or Pimple. However, it`s up to you how to use it. You can create an instance of the queue manager like this: ``` php $queueManager = new Arko\QueueManager\QueueManager();

From now you can use it to add different actions to the named queues:, (*3)

``` php $queueManager->add(function() { // Do something here }, 'queue_name');, (*4)

// ..., (*5)

$queueManager->add(function() { // Do something else, maybe somewhere else. }, 'queue_name');, (*6)

As a first argument to the queue manager add method you can provide any php callable.

Later you will be able to process the queue like this:

``` php
$queueManager->process('queue_name');

After the queue is processed, it will be cleared. Generally speaking, it will be cleared just before the queue is processed. So, nested queues should work just fine., (*7)

The Versions

26/06 2015

dev-master

9999999-dev

Callables queue manager

  Sources   Download

MIT

The Requires

 

by Artyom Kozhemyakin