Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit b577a25

Browse files
author
Juuso Mäyränen
committed
Break at end of loop
1 parent fc8fb7c commit b577a25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/logstash/inputs/redis.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ def ensure_workers(output_queue)
291291
keys = @redis.keys(@key)
292292
keys.shuffle
293293
keys.each do |key|
294-
break unless threadpool_capacity?
295294
next if @current_workers.include?(key)
296295
@current_workers.add(key)
297296
@threadpool.post do
@@ -301,6 +300,7 @@ def ensure_workers(output_queue)
301300
@current_workers.delete(key)
302301
end
303302
end
303+
break unless threadpool_capacity?
304304
end
305305
end
306306

0 commit comments

Comments
 (0)