Skip to content

Commit bbe25c7

Browse files
nirvdrumdefunkt
authored andcommitted
Bugfix: Worker.all should never return nil
1 parent 3737f83 commit bbe25c7

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
@@ -24,7 +24,7 @@ class Worker
2424

2525
# Returns an array of all worker objects.
2626
def self.all
27-
Array(redis.smembers(:workers)).map { |id| find(id) }
27+
Array(redis.smembers(:workers)).map { |id| find(id) }.compact
2828
end
2929

3030
# Returns an array of all worker objects currently processing

0 commit comments

Comments
 (0)