Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A resque plugin for unique jobs

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.markdown
Octocat-spinner-32 Rakefile
Octocat-spinner-32 resque-unique-job.gemspec
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

Something went wrong with that request. Please try again.