2017 © Pedro Peláez
 

library disque-php

PHP library for Disque, an in-memory, distributed job queue

image

mariano/disque-php

PHP library for Disque, an in-memory, distributed job queue

  • Tuesday, May 30, 2017
  • by mariano
  • Repository
  • 11 Watchers
  • 123 Stars
  • 28,320 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 19 Forks
  • 13 Open issues
  • 11 Versions
  • 14 % Grown

The README.md

disque-php

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads, (*1)

A PHP library for the very promising disque distributed job queue. Features:, (*2)

  • Support for both PHP (5.5+) and HHVM
  • No dependencies: Fast connection to Disque out-of-the-box
  • High level API to easily push jobs to a queue, and retrieve jobs from queues
  • Easily schedule jobs for execution at a certain DateTime
  • Use the built in Job class, or implement your own
  • Smart node connection support based on number of jobs produced by nodes
  • Connect to Disque with the built-in connection, or reutilize your existing Redis client (such as predis)
  • Supporting all current Disque commands, and allows you to easily implement custom commands
  • Fully unit tested

Installation

$ composer require mariano/disque-php --no-dev

If you want to run its tests remove the --no-dev argument., (*3)

Usage

This library provides a Queue API for easy job pushing/pulling, and direct access to all Disque commands via its Client API., (*4)

Create the client:, (*5)

use Disque\Connection\Credentials;
use Disque\Client;

$nodes = [
    new Credentials('127.0.0.1', 7711),
    new Credentials('127.0.0.1', 7712, 'password'),
];

$disque = new Client($nodes);

Queue a job:, (*6)

$job = new \Disque\Queue\Job(['name' => 'Claudia']);
$disque->queue('my_queue')->push($job);

Schedule job to be processed at a certain time:, (*7)

$job = new \Disque\Queue\Job(['name' => 'Mariano']);
$disque->queue('my_queue')->schedule($job, new \DateTime('+2 hours'));

Fetch queued jobs, mark them as processed, and keep waiting on jobs:, (*8)

$queue = $disque->queue('my_queue');
while ($job = $queue->pull()) {
    echo "GOT JOB!";
    var_dump($job->getBody());
    $queue->processed($job);
}

For more information on the APIs provided, read the full documentation., (*9)

Testing

bash $ phpunit, (*10)

Contributing

Please see CONTRIBUTING for details., (*11)

Support

If you need some help or even better want to collaborate, feel free to hit me on twitter: @mgiglesias, (*12)

Security

If you discover any security related issues, please contact @mgiglesias instead of using the issue tracker., (*13)

Acknowledgments

First and foremost, Salvatore Sanfilippo for writing what looks to be the definite solution for job queues (thanks for all the fish Gearman)., (*14)

Other disque client libraries for the inspiration., (*15)

The PHP League for an awesome README.md skeleton, and tips about packaging PHP components., (*16)

A special acknolewdgment and appreciation for our amazing contributors!, (*17)

License

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

The Versions

30/05 2017

dev-master

9999999-dev https://github.com/mariano/disque-php

PHP library for Disque, an in-memory, distributed job queue

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

queue job disque

16/02 2017

2.0.3

2.0.3.0 https://github.com/mariano/disque-php

PHP library for Disque, an in-memory, distributed job queue

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

queue job disque

10/05 2016

2.0.2

2.0.2.0 https://github.com/mariano/disque-php

PHP library for Disque, an in-memory, distributed job queue

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

queue job disque

10/05 2016

2.0.1

2.0.1.0 https://github.com/mariano/disque-php

PHP library for Disque, an in-memory, distributed job queue

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

queue job disque

07/12 2015

dev-cli_tool

dev-cli_tool https://github.com/mariano/disque-php

PHP library for Disque, an in-memory, distributed job queue

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

queue job disque

03/11 2015

2.0-alpha

2.0.0.0-alpha https://github.com/mariano/disque-php

PHP library for Disque, an in-memory, distributed job queue

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

queue job disque

18/05 2015

1.3.0

1.3.0.0 https://github.com/mariano/disque-php

PHP library for Disque, an in-memory, distributed job queue

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

queue job disque

14/05 2015

1.2.1

1.2.1.0 https://github.com/mariano/disque-php

PHP library for Disque, an in-memory, distributed job queue

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

queue job disque

12/05 2015

1.2.0

1.2.0.0 https://github.com/mariano/disque-php

PHP library for Disque, an in-memory, distributed job queue

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

queue job disque

10/05 2015

1.1.0

1.1.0.0 https://github.com/mariano/disque-php

PHP library for Disque, an in-memory, distributed job queue

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

queue job disque

04/05 2015

1.0.0

1.0.0.0 https://github.com/mariano/disque-php

PHP library for Disque, an in-memory, distributed job queue

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

queue job disque