Skip to content

Commit 2764529

Browse files
floridefunkt
authored andcommitted
Fix bug causing working to always return the max
Apparently value isn't (always?) nil, but an empty hash, if the worker isn't working.
1 parent 7f4c79a commit 2764529

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/resque/worker.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def self.working
3636
names.map! { |name| "worker:#{name}" }
3737

3838
reportedly_working = redis.mapped_mget(*names).reject do |key, value|
39-
value.nil?
39+
value.nil? || value.empty?
4040
end
4141
reportedly_working.keys.map do |key|
4242
find key.sub("worker:", '')

0 commit comments

Comments
 (0)