dev-master
9999999-dev
The Development Requires
- phpunit/phpunit 3.*
- mockery/mockery dev-master@dev
- phpredis/phpredis 2.2.3
Wallogit.com
2017 © Pedro Peláez
This library allows to add tasks for celery using different backends and simplifies access to it., (*1)
pushTask(
$exchangeName,
$queueName,
$taskName,
$exchangeType,
array $args
);
?>
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)
To add new Celery backend you should create two classes of name:, (*7)
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)