Permalink
Browse files

Fixes undefined method `to_sym' for nil:NilClass error in priority.rb

- Jobs enqueued with Resque.enqueue() are in the default queue with no
priority. When resque-priority is enabled on the class, the call to
perform() fails because the priority is undefined and isn't set to
:normal.
  • Loading branch information...
1 parent 135b9d3 commit bc5dca990d6370ad7eaa01d0b986c90f541a4d18 @loren loren committed Feb 22, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/resque/plugins/priority.rb
@@ -29,7 +29,7 @@ def priority_key(*args)
def around_perform_retrieve_priority(*args)
key = priority_key(*args)
priority = Resque.redis.get(key)
- self.priority = priority && priority.empty? ? :normal : priority
+ self.priority = priority.blank? ? :normal : priority
begin
yield

0 comments on commit bc5dca9

Please sign in to comment.