Skip to content

Commit

Permalink
Use range syntax for available_worker_ids
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
  • Loading branch information
cosmo0920 committed Feb 21, 2019
1 parent 9b898c1 commit 44f206a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/fluent/root_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ def initialize(log:, system_config: SystemConfig.new)

def configure(conf)
used_worker_ids = []
available_worker_ids = []
0.step(Fluent::Engine.system_config.workers - 1, 1).each do |id|
available_worker_ids << id
end
available_worker_ids = (0..Fluent::Engine.system_config.workers - 1).to_a
# initialize <worker> elements
conf.elements(name: 'worker').each do |e|
target_worker_id_str = e.arg
Expand Down

0 comments on commit 44f206a

Please sign in to comment.