承接 mrpoundsign/pheanstalk-5.3 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mrpoundsign/pheanstalk-5.3

Composer 安装命令:

composer require mrpoundsign/pheanstalk-5.3

包简介

Pure PHP5.3 client for the Beanstalk queueing system. Alls credits belong to author, Paul Annesley

README 文档

README

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.

Created by Paul Annesley, modified by Brian Nelson for PHP 5.3 namespaces, 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.0 release in 2010.

beanstalkd up to the latest version 1.4 is supported. All commands and responses specified in the protocol documentation for beanstalkd 1.3 are implemented.

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.

Contributors

Licence

(c) Paul Annesley

Released under the The MIT License

统计信息

  • 总下载量: 13.27k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 3
  • 推荐数: 1

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 282
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-07-22