Skip to content

Commit 1cf7aeb

Browse files
authored
in_fluent_package_update_notifier: support multi worker (#8)
If confiured using multi worker, `in_fluent_package_update_notifier` causes following config error. ### config ``` <system> workers 2 </system> <source> @type fluent_package_update_notifier </source> ``` ### error ``` 2025-08-27 17:20:33 +0900 [error]: config error file="/home/watson/prj/sandbox/fluentd/fluent.conf" error_class=Fluent::ConfigError error="Plugin 'fluent_package_update_notifier' does not support multi workers configuration (Fluent::Plugin::FluentPackageUpdateNotifierInput)" ``` This PR will solve above config error.
1 parent 0095740 commit 1cf7aeb

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

lib/fluent/plugin/in_fluent_package_update_notifier.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ class FluentPackageUpdateNotifierInput < Fluent::Plugin::Input
4040
desc "Package repository site"
4141
config_param :repository_sites, :array, default: ["https://packages.treasuredata.com"]
4242

43+
def multi_workers_ready?
44+
true
45+
end
46+
4347
def configure(conf)
4448
super
4549
end

test/plugin/test_in_fluent_package_update_notifier.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ def config
3030
]
3131
end
3232

33+
test "multi worker" do
34+
d = create_driver
35+
assert_true d.instance.multi_workers_ready?
36+
end
37+
3338
sub_test_case "configuration test" do
3439
test "default configuration" do
3540
assert_nothing_raised do

0 commit comments

Comments
 (0)