PHP code example of hyssa-dev / hibiken-asynq-client
1. Go to this page and download the library: Download hyssa-dev/hibiken-asynq-client library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hyssa-dev / hibiken-asynq-client example snippets
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);
}
}
"php": "^8.1",
"ext-redis": "^5.3",