From 0a7a590578e7d59de75f841e18b82494e7390e30 Mon Sep 17 00:00:00 2001 From: Fujimoto Seiji Date: Fri, 1 Jul 2022 12:53:18 +0900 Subject: [PATCH] Apply feedback from ashie on GitHub#3808 Signed-off-by: Fujimoto Seiji --- lib/fluent/plugin/base.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/fluent/plugin/base.rb b/lib/fluent/plugin/base.rb index 85dcd65254..28485dcbd5 100644 --- a/lib/fluent/plugin/base.rb +++ b/lib/fluent/plugin/base.rb @@ -34,6 +34,7 @@ def initialize @_state = State.new(false, false, false, false, false, false, false, false, false) @_context_router = nil @_fluentd_worker_id = nil + @_fluentd_lockdir = nil @under_plugin_development = false end @@ -74,7 +75,7 @@ def multi_workers_ready? true end - def acquire_worker_lock(name, &block) + def acquire_worker_lock(name) if fluentd_lockdir.nil? raise InvalidLockDirectory, "can't acquire lock because FLUENTD_LOCKDIR isn't set" end