Skip to content

Commit

Permalink
Fix bug causing working to always return the max
Browse files Browse the repository at this point in the history
Apparently value isn't (always?) nil, but an empty hash, if the worker
isn't working.
  • Loading branch information
flori authored and defunkt committed Jul 14, 2011
1 parent 7f4c79a commit 2764529
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/resque/worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def self.working
names.map! { |name| "worker:#{name}" }

reportedly_working = redis.mapped_mget(*names).reject do |key, value|
value.nil?
value.nil? || value.empty?
end
reportedly_working.keys.map do |key|
find key.sub("worker:", '')
Expand Down

0 comments on commit 2764529

Please sign in to comment.