定制 scones/resque-loner 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

scones/resque-loner

Composer 安装命令:

composer require scones/resque-loner

包简介

resque-loner is a plugin for scones/resque to make your jobs unique.

README 文档

README

This is a plugin ensure a job with a specific set of arguments can't be queued twice. Usefulness ranges from "Ensure a customer is mailed just once" up to "fire a task as often as wanted, without caring (fire and forget)"

Install

In most cases it should suffice to just install it via composer.

composer require scones/resque-loner "*@stable"

Usage

You will need to have a psr-14 listener provider configured ($listenerProvider). You will need to have a psr-14 task processor configured (using the same listener provider, added to resque and worker and job).

Having that, it will boil down to:

// assuming PredisClient is initialized in $redisClient
$datastore = new DataStore($redisClient);

$resqueLoner = new ResqueLoner($datastore, $listenerProvider);
$resqueLogger->register();

You can also always inspect the examples: https://github.com/scones/resque-examples

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-10-25