2017 © Pedro Peláez
 

library pheanstalk

PHP client for beanstalkd queue

image

brightlocal/pheanstalk

PHP client for beanstalkd queue

  • Wednesday, May 27, 2015
  • by dmitry-vovk
  • Repository
  • 25 Watchers
  • 0 Stars
  • 58,280 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 230 Forks
  • 0 Open issues
  • 12 Versions
  • 5 % Grown

The README.md

Pheanstalk

Build Status, (*1)

Pheanstalk is a pure PHP 5.3+ client for the beanstalkd workqueue. It has been actively developed, and used in production by many, since late 2008., (*2)

Created by [Paul Annesley][2], Pheanstalk is rigorously unit tested and written using encapsulated, maintainable object oriented design. Community feedback, bug reports and patches has led to a stable 1.0 release in 2010, a 2.0 release in 2013, and a 3.0 release in 2014., (*3)

Pheanstalk 3.0 introduces PHP namespaces, PSR-1 and PSR-2 coding standards, and PSR-4 autoloader standard., (*4)

beanstalkd up to the latest version 1.4 is supported. All commands and responses specified in the [protocol documentation][3] for beanstalkd 1.3 are implemented., (*5)

Installation with Composer

Install pheanstalk as a dependency with composer:, (*6)

composer require pda/pheanstalk

Usage Example

<?php

// Hopefully you're using Composer autoloading.

use Pheanstalk\Pheanstalk;

$pheanstalk = new Pheanstalk('127.0.0.1');

// ----------------------------------------
// producer (queues jobs)

$pheanstalk
  ->useTube('testtube')
  ->put("job payload goes here\n");

// ----------------------------------------
// worker (performs jobs)

$job = $pheanstalk
  ->watch('testtube')
  ->ignore('default')
  ->reserve();

echo $job->getData();

$pheanstalk->delete($job);

// ----------------------------------------
// check server availability

$pheanstalk->getConnection()->isServiceListening(); // true or false

Running the tests

There is a section of the test suite which depends on a running beanstalkd at 127.0.0.1:11300, which was previously opt-in via --with-server. Since porting to PHPUnit, all tests are run at once. Feel free to submit a pull request to rectify this., (*7)

# ensure you have Composer set up
$ wget http://getcomposer.org/composer.phar
$ php composer.phar install

# ensure you have PHPUnit
$ composer install --dev

$ ./vendor/bin/phpunit
PHPUnit 4.0.19 by Sebastian Bergmann.

Configuration read from /Users/pda/code/pheanstalk/phpunit.xml.dist

................................................................. 65 / 83 ( 78%)
..................

Time: 239 ms, Memory: 6.00Mb

OK (83 tests, 378 assertions)

Contributors

Licence

© Paul Annesley, (*8)

Released under the The MIT License, (*9)

The Versions

27/05 2015

dev-master

9999999-dev https://github.com/pda/pheanstalk

PHP client for beanstalkd queue

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

beanstalkd

26/03 2015

dev-sraka1-persistent-connection

dev-sraka1-persistent-connection https://github.com/pda/pheanstalk

PHP client for beanstalkd queue

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

beanstalkd

09/03 2015

dev-disconnect

dev-disconnect https://github.com/pda/pheanstalk

PHP client for beanstalkd queue

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

beanstalkd

08/03 2015

dev-docker-tests

dev-docker-tests https://github.com/pda/pheanstalk

PHP client for beanstalkd queue

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

beanstalkd

02/12 2014

2.1.x-dev

2.1.9999999.9999999-dev https://github.com/pda/pheanstalk

PHP client for beanstalkd queue

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

beanstalkd

02/12 2014

v2.1.1

2.1.1.0 https://github.com/pda/pheanstalk

PHP client for beanstalkd queue

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

beanstalkd

08/11 2014

v3.0.2

3.0.2.0 https://github.com/pda/pheanstalk

PHP client for beanstalkd queue

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

beanstalkd

08/11 2014

v3.0.1

3.0.1.0 https://github.com/pda/pheanstalk

PHP client for beanstalkd queue

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

beanstalkd

18/06 2014

v3.0.0

3.0.0.0 https://github.com/pda/pheanstalk

PHP client for beanstalkd queue

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

beanstalkd

03/04 2013

v2.1.0

2.1.0.0 https://github.com/pda/pheanstalk

PHP client for beanstalkd queue

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

beanstalkd

25/03 2013

v2.0.0

2.0.0.0 https://github.com/pda/pheanstalk

PHP client for beanstalkd queue

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

beanstalkd

28/02 2013

v2.0.0-rc1

2.0.0.0-RC1 https://github.com/pda/pheanstalk

PHP client for beanstalkd queue

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

beanstalkd