italiansubs/resque-enqueuer 问题修复 & 功能扩展

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

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

italiansubs/resque-enqueuer

最新稳定版本:v0.1.4

Composer 安装命令:

composer require italiansubs/resque-enqueuer

包简介

A library that lets you enqueue jobs in Resque from a PHP application

关键字:

README 文档

README

A library that lets you enqueue Resque jobs from a PHP application.

Requirements

  • php >= 5.3.3 (>= 5.4 in order to be able to run the tests)
  • phpredis

Installation

Create a composer.json file with the following content:

{
    "require": {
        "italiansubs/resque-enqueuer": "0.1.*"
    }
}

Then run

$ curl -s https://getcomposer.org/installer | php
$ php composer.phar install

You should now have ResqueEnqueuer installed inside your vendor folder: vendor/italiansubs/resque-enqueuer

And an handy autoload file to include in you project: vendor/autoload.php

How to use

<?php
require_once __DIR__ . '/vendor/autoload.php';

use ResqueEnqueuer\Enqueuer;

try {
    $enq = new Enqueuer(); // $redisHost, $redisPort, $redisDb, $resqueBaseKeyName
    $enq->enqueue('queue_name', 'job_name', array('id_user' => 100, 'other_param' => 'foo'));
} catch (RedisException $e) {
    echo $e->getMessage() . PHP_EOL;
}

Testing

The library is fully tested with PHPUnit.

Go to the base library folder and install the dev dependencies with composer, and then run the phpunit test suite

$ composer --dev install
$ ./vendor/bin/phpunit --colors test

Thanks

Many thanks to the great folks that developed and are contributing to the absolutely awesome tool that is Resque!

Also props to my friend and colleague Matteo Giachino that pushed me to open source my first project and from whom I pretty much copied this readme structure.

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-01-26