2017 © Pedro Peláez
 

symfony-bundle queue-manager-bundle

Allows you to create and process callables queues using singleton service

image

arko/queue-manager-bundle

Allows you to create and process callables queues using singleton service

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

The README.md

QueueManagerBundle

How to install

Step 1: Download using composer:

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

### Step 2: Enable the bundle:

``` php
<?php
// app/AppKernel.php

public function registerBundle() {
    $bundles = array(
        // ...
        new Arko\QueueManagerBundle\ArkoQueueManagerBundle(),
    );
}

How to use

You should be able to get queue manager service from the service container like this:, (*2)

``` php $queueManager = $container->get('arko.queue_manager');, (*3)


Or, as usual, you can inject it in your own service definitions using its id: **arko.queue_manager**. From now you can use it to add different actions to the named queues: ``` php $queueManager->add(function() { // Do something here }, 'queue_name'); // ... $queueManager->add(function() { // Do something else, maybe somewhere else. }, 'queue_name');

As a first argument to the queue manager add method you can provide any php callable., (*4)

Later you will be able to process the queue like this:, (*5)

php $queueManager->process('queue_name');, (*6)

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

Allows you to create and process callables queues using singleton service

  Sources   Download

MIT

The Requires

 

by Artyom Kozhemyakin