module Resque

Since there were not enough hooks to hook into, I have to overwrite 3 methods of Resque::Job - the rest of the implementation is in the proper Plugin namespace.

If you want your job to be unique, include this module in it. If you wish, you can overwrite this implementation of redis_key to fit your needs

Public Class Methods

enqueued?(klass, *args) click to toggle source
# File lib/resque-ext/resque.rb, line 2
def self.enqueued?(klass, *args)
  enqueued_in?(queue_from_class(klass), klass, *args)
end
enqueued_in?(queue, klass, *args) click to toggle source
# File lib/resque-ext/resque.rb, line 6
def self.enqueued_in?(queue, klass, *args)
  item = { class: klass.to_s, args: args }
  return nil unless Resque::Plugins::Loner::Helpers.item_is_a_unique_job?(item)
  Resque::Plugins::Loner::Helpers.loner_queued?(queue, item)
end
remove_queue(queue)
remove_queue_with_loner_cleanup(queue) click to toggle source
# File lib/resque-ext/resque.rb, line 12
def self.remove_queue_with_loner_cleanup(queue)
  remove_queue_without_loner_cleanup(queue)
  Resque::Plugins::Loner::Helpers.cleanup_loners(queue)
end
Also aliased as: remove_queue
remove_queue_without_loner_cleanup(queue)
Alias for: remove_queue