Redis支持的任务队列延迟作业处理:punctual

jopen 9年前

基于Redis的任务队列,轮询和处理机制。用于延迟作业处理。设计为轻量级和高度可定制的,这个包提供了一个任务队列和轮询机制,以及从中继承基本任务相关的对象。
它通过Redis代替专门的MQ来管理非本地持久性。这降低了在堆栈中的复杂性,因为Redis已经是一个用于临时存储和缓存常用组件。

有什么不同

Internally works a bit like kue, storing scheduled tasks as sorted-set (ZSET) members and individual hashes. Unlike kue, however, it:

  • distinguishes TaskRunners - TaskRunner prototypes can be programmed to handle & process specific task types
  • does not implement a REST API, instead exposing a DAO where methods can be called imperatively
  • does not use 'priority' in task execution, instead using raw timestamps to determine what tasks to run when (stored as ZSET scores)
  • does not leave any ghost tasks in Redis, using EXPIREAT to expire task keys
  • does not require a callback, task execution can be fire-and-forget and errors/info received through event subscribers

项目主页:http://www.open-open.com/lib/view/home/1416467712227