s12v/phpque 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

s12v/phpque

最新稳定版本:0.0.3

Composer 安装命令:

composer require s12v/phpque

包简介

Lightweight Disque client

README 文档

README

Build Status Scrutinizer Code Quality Latest Stable Version

phpque

Lightweight and fast Disque PHP client without external dependencies. Supports PHP 5.3, 5.4, 5.5, 5.6, and HHVM.

Installation

composer require s12v/phpque

Usage

<?php

use Phpque\Client;
use Phpque\Connection\ConnectionException;

require '../vendor/autoload.php';

try {
    // Connect to a server pool
    $client = new Client(['tcp://127.0.0.1:7711', 'tcp://127.0.0.1:7712']);

    // ... or to a single server
    $client = new Client('tcp://127.0.0.1:7711');
} catch (ConnectionException $e) {
    // Handle connection errors
    throw $e;
}

// Add a job with payload "some data" and timeout 1 sec
$client->addJob('test_queue', 'some data', 1000);

// Get a job from the queue
$job = $client->getJob(array('test_queue'));

// Acknowledge the job
$client->ackJob($job);

API

Refer to the Disque documentation and ClientInterface

Development

Run tests:

./vendor/bin/phpunit

统计信息

  • 总下载量: 45
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-01