承接 hyssa-dev/hibiken-asynq-client 相关项目开发

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

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

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-08-19