hyssa-dev/hibiken-asynq-client
最新稳定版本:0.0.3
Composer 安装命令:
composer require hyssa-dev/hibiken-asynq-client
包简介
go hibiken/asynq client
README 文档
README
This is a client for the hibiken/asynq GO task queue used to send asynq tasks in PHP.
Asynq issues Client in other languages
hibiken/asynq#105 (comment) hibiken/asynq#105 (comment)
Asynq
https://github.com/hibiken/asynq Asynq is a Go library for queueing tasks and processing them asynchronously with workers. It's backed by Redis and is designed to be scalable yet easy to get started.
required
"php": "^8.1",
"ext-redis": "^5.3",
install
composer require hyssa-dev/hibiken-asynq-client:dev-main
used
use Client to put tasks on queues.
example
namespace HyssaDev\HibikenAsynqClient\Tests; use Ramsey\Uuid\Uuid; use HyssaDev\HibikenAsynqClient\Client; class ClientTest extends \PHPUnit\Framework\TestCase { public function testEnqueue() { $redis = new \Redis(); $redis->connect('127.0.0.1'); $clinet = new Client($redis); $res = $clinet->Enqueue([ 'typename'=>'newtest:user:xxxx', 'payload'=>[ 'test'=>'xxxx', 'user'=>1111 ], 'opts'=>[ 'timeout'=>0, ] ],[ 'queue'=>'test' ]); $this->assertTrue($res); } }
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-08-19