No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Resque plugin for batching jobs. When a batch/group of jobs are complete, additional work can be performed usings batch hooks.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

>= 1.25.0
 Project Readme

Resque Batched Job Build Status

A Resque plugin. Requires Resque >= 1.10.0

This plugin adds the ability to batch jobs and run additional hooks after the last job in a batch is performed. Using the 'after_enqueue' hook, the job is encoded and stored in a Redis List identified by the batch id provided. By default, the batch keys look like 'batch:#{id}'. After each job is performed, it's removed from the batch list. If the last job performed happens to be the last in the list, additional hooks are executed. These hooks are prefixed with 'after_batch'.

Installation

$ gem install resque-batched-job

Example

require 'resque/batched_job'

module Job
  extend Resque::Plugins::BatchedJob

  def self.perform(bid, *args)
    prime(bid, args)
  end

  def self.after_batch_heavy_lifting(bid, *args)
    heavy_lifting(bid)
  end

end