2017 © Pedro Peláez
 

library celery-php

image

piteer1/celery-php

  • Tuesday, December 9, 2014
  • by piteer1
  • Repository
  • 1 Watchers
  • 0 Stars
  • 384 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Celery-PHP library

What is it?

This library allows to add tasks for celery using different backends and simplifies access to it., (*1)

Usage example

pushTask(
        $exchangeName,
        $queueName,
        $taskName,
        $exchangeType,
        array $args
    );
?>

Unittests

To run unittests be sure fistly to run, (*2)

make init

Later you should be able to use, (*3)

make phpunit

It's also possible to use phpunit from your system installation. If you have it already installed just, (*4)

cd tests
phpunit

Be sure thought to still run make init because it will install necessary Mockery., (*5)

Additionally you will need a phpredis extension installed and added to PHP. You can find phpredis in vendor directory if you'll run make composer / make init., (*6)

Developer instructions

To add new Celery backend you should create two classes of name:, (*7)

  • BackendName in Celery/Backend/BackendName.php file
  • BackendNameOptions in Celery/Backend/BackendNameOptions.php file

First class should implement BackendInterface (can also extend BackendAbstract class). This class handles task itself encapsulating backend specific functions (it's an Adapter)., (*8)

Second class should encapsulate backend specific initialization., (*9)

If one of backends cannot implement one of the methods required by interface because it doesn't support one of the exchange type, it should throw an exception Celery\Exception\NotSupportedExchangeTypeException, (*10)

The Versions

09/12 2014

dev-master

9999999-dev

  Sources   Download

The Development Requires