amphp/beanstalk 问题修复 & 功能扩展

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

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

amphp/beanstalk

最新稳定版本:v0.3.2

Composer 安装命令:

composer require amphp/beanstalk

包简介

Async beanstalk driver for Amp.

README 文档

README

Build Status CoverageStatus License

amphp/beanstalk is an asynchronous Beanstalk client for PHP based on Amp.

Installation

composer require amphp/beanstalk

Examples

More extensive code examples reside in the examples directory.

<?php

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

use Amp\Beanstalk\BeanstalkClient;
use Amp\Loop;

Loop::run(function () {
    $beanstalk = new BeanstalkClient("tcp://127.0.0.1:11300");
    yield $beanstalk->use('sometube');

    $payload = json_encode([
        "job" => bin2hex(random_bytes(16)),
        "type" => "compress-image",
        "path" => "/path/to/image.png"
    ]);

    $jobId = yield $beanstalk->put($payload);

    echo "Inserted job id: $jobId\n";

    $beanstalk->quit();
});

License

The MIT License (MIT). Please see LICENSE for more information.

统计信息

  • 总下载量: 38.52k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 68
  • 点击次数: 1
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 67
  • Watchers: 9
  • Forks: 26
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-09