A resque plugin for unique jobs
Ruby
Latest commit 461a668 Mar 5, 2011 Andy Delcambre and Larry Diehl Better README
Failed to load latest commit information.
lib/resque/plugins Release version 0.0.1 Mar 5, 2011
spec It works Mar 5, 2011
.gitignore Ignore built gems Mar 5, 2011
Gemfile It works Mar 5, 2011
LICENSE It works Mar 5, 2011
README.markdown Better README Mar 5, 2011
Rakefile It works Mar 5, 2011
resque-unique-job.gemspec It works Mar 5, 2011

README.markdown

resque-unique-job

Depends on Resque 1.8

About

This is a gem that will prevent multiple of the same job being enqueued with resque.

It works by overriding the JobClass.enqueue method so you need to define a base class that defines self.enqueue before extending the plugin.

Examples

class BaseJob
  def self.enqueue(*args)
    Resque.enqueue(self, *args)
  end
end

class MyJob < BaseJob
  extend Resque::Plugins::UniqueJob

  def self.perform(*args)
    #do stuff
  end
end

Requirements