Skip to content

Commit

Permalink
Improve conditions
Browse files Browse the repository at this point in the history
* Change of order
* Use `conf.for_every_workers?` instead of `conf.target_worker_ids.empty?`.

Signed-off-by: abetomo <[email protected]>
  • Loading branch information
abetomo committed Mar 10, 2023
1 parent d691d6f commit a1b9913
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fluent/plugin/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def fluentd_worker_id
def configure(conf)
raise ArgumentError, "BUG: type of conf must be Fluent::Config::Element, but #{conf.class} is passed." unless conf.is_a?(Fluent::Config::Element)

if (Fluent::Engine.supervisor_mode && !conf.target_worker_ids.empty?) || conf.for_this_worker?
if conf.for_this_worker? || (Fluent::Engine.supervisor_mode && !conf.for_every_workers?)
system_config_override(workers: conf.target_worker_ids.size)
end

Expand Down

0 comments on commit a1b9913

Please sign in to comment.