Skip to content

Commit

Permalink
Fixes undefined method `to_sym' for nil:NilClass error in priority.rb
Browse files Browse the repository at this point in the history
- 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
loren committed Feb 22, 2012
1 parent 135b9d3 commit bc5dca9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/resque/plugins/priority.rb
Expand Up @@ -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
Expand Down

0 comments on commit bc5dca9

Please sign in to comment.