indigophp/queue

This package is abandoned and no longer maintained. The author suggests using the bernard/bernard package instead.

Manage work queues with PHP

v2.0.0-rc1 2014-07-23 18:24 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:29:22 UTC


README

Build Status Code Coverage Latest Stable Version Total Downloads Scrutinizer Quality Score License Dependency Status

Indigo Queue manages your queues and processes the jobs you put onto them.

Install

Via Composer

{
    "require": {
        "indigophp/queue": "@stable"
    }
}

Usage

First of all you have decide which MQ do you want to use. Currently supported MQs:

There is also a special implementation, where to job is not sent to a queue, but executed immediately.

Connector

Connector does the communication between the server and the Queue/Worker class.

Queue

You use the Queue class to push jobs to a queue. You can also push a job with a delay.

See Queue example.

Worker

You usually set up a console application for your workers.

See Worker example.

Job

See examples;

Special connector: DirectConnector

This connector does what you think: Executes the pushed job immediately. You can also push a delayed job, BUT BE CAREFUL: this means that your application will sleep for a certain time, so use it wisely.

Testing

$ codecept run

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.