pyrowman/pheanstalk
Composer 安装命令:
composer require pyrowman/pheanstalk
包简介
PHP client for EvQueue queue
关键字:
README 文档
README
Pheanstalk is a pure PHP 7.1+ client for the evqueue workqueue.
Pheanstalk 3.0 introduces PHP namespaces, PSR-1 and PSR-2 coding standards, and PSR-4 autoloader standard.
This project is a fork from the original Pheanstalk wich is a client for the beanstalkd workqueue.
Special thanks to Paul Annesley; the original creator of the library.
Installation with Composer
Install pheanstalk as a dependency with composer:
composer require pyrowman/pheanstalk
Usage Example
<?php // Hopefully you're using Composer autoloading. use Pheanstalk\Pheanstalk; $pheanstalk = new Pheanstalk('127.0.0.1', 'admin', 'admin'); // Create a simple Worflow with one job inside $workflow = $pheanstalk->createTask('Sleep', 'Test', '/bin/sleep 80'); // Put the job into instance execution $pheanstalk->put($workflow); // ---------------------------------------- // check server availability $pheanstalk->getConnection()->isServiceListening(); // true or false //----------------------------------------- // Add a scheduler for the job (by default in continous) $workflowSchedule = $pheanstalk->createSchedule($workflow, new TimeSchedule()); //----------------------------------------- // Edit a workflow $workflow->setGroup('2nd test group'); $pheanstalk->update($workflow); //----------------------------------------- // Getting infos on the execution of a workflow $workflowInstancesExecuting = $pheanstalk->getWorkflowInstances($workflow, GetWorkflowInstancesCommand::FILTER_EXECUTING); $workflowInstancesTerminated = $pheanstalk->getWorkflowInstances($workflow, GetWorkflowInstancesCommand::FILTER_TERMINATED); //----------------------------------------- // Delete a job if ($workflow = $pheanstalk->workflowExists('Sleep')) $pheanstalk->delete($workflow);
Running the tests
There is a section of the test suite which depends on a running evqueue at 127.0.0.1:5000. Since porting to PHPUnit, all tests are run at once. Feel free to submit a pull request to rectify this.
# ensure you have Composer set up $ wget http://getcomposer.org/composer.phar $ php composer.phar install $ ./vendor/bin/phpunit -c phpunit.xml.dist PHPUnit 7.5.14 by Sebastian Bergmann and contributors. ............................................................... 63 / 110 ( 57%) ............................................... 110 / 110 (100%) Time: 6.55 seconds, Memory: 10.00 MB OK (110 tests, 161 assertions) Generating code coverage report in HTML format ... done
License
© Valentin Corre
Released under the The MIT License
pyrowman/pheanstalk 适用场景与选型建议
pyrowman/pheanstalk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 419 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 07 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「evqueue」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 pyrowman/pheanstalk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 pyrowman/pheanstalk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 pyrowman/pheanstalk 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
统计信息
- 总下载量: 419
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 12
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-07-03