Permalink
Browse files

no longer uses after_enqueue hook as this has been moved out of Job.c…

…reate in the latest resque
  • Loading branch information...
1 parent 223ca39 commit 135b9d3343e33a0b37e953aeb28d4a3e28d7ba3e Karl committed May 4, 2011
Showing with 1 addition and 3 deletions.
  1. +1 −3 lib/resque/plugins/priority.rb
@@ -8,6 +8,7 @@ def self.enqueue_with_priority(priority, klass, *args)
klass.priority = priority
Resque::Job.create(queue, klass, *args)
+ Resque.redis.setnx(klass.priority_key(*args), priority)
end
module Plugins
@@ -24,9 +25,6 @@ def priority_key(*args)
['priority', 'name', priority_identifier(*args)].compact.join(':')
end
- def after_enqueue_set_priority(*args)
- Resque.redis.setnx(priority_key(*args), @priority)
- end
def around_perform_retrieve_priority(*args)
key = priority_key(*args)

0 comments on commit 135b9d3

Please sign in to comment.