This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitmodules | Sun May 31 05:14:29 -0700 2009 | |
| |
LICENCE | Mon Oct 13 23:32:59 -0700 2008 | |
| |
README.md | Tue Jun 23 05:12:13 -0700 2009 | |
| |
classes/ | Wed Aug 05 09:06:51 -0700 2009 | |
| |
doc/ | Wed Jun 17 04:22:07 -0700 2009 | |
| |
pheanstalk_init.php | Tue Jun 23 05:04:38 -0700 2009 | |
| |
tests/ | Tue Jun 23 05:04:38 -0700 2009 |
README.md
Pheanstalk
Pheanstalk, created by Paul Annesley, is a pure PHP 5.2+ client for the beanstalkd workqueue. The code is rigorously unit tested and written using encapsulated, maintainable object oriented design.
All commands and responses specified in the protocol documentation for beanstalkd 1.3 are fully supported.
Usage Example
<?php
// register Pheanstalk class loader
require_once('pheanstalk_init.php');
$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);
?>
Running the tests
# ensure you have simpletest
$ git submodule init
$ git submodule update
$ ./tests/runtests.php
All Tests
OK
Test cases run: 4/4, Passes: 103, Failures: 0, Exceptions: 0
# extra tests relying on a beanstalkd on 127.0.0.1:11300
$ ./tests/runtests.php --with-server
All Tests
OK
Test cases run: 7/7, Passes: 198, Failures: 0, Exceptions: 0
$ ./tests/runtests.php --help
CLI test runner.
Available options:
--with-server Includes tests which connect to a beanstalkd server
--testfile Only run the specified test file.
--help This documentation.







