From 2d37245573a4c2f285d945fd7a3d9a7e6a43d0f9 Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Fri, 15 Apr 2016 22:54:18 +0900 Subject: [PATCH] Call setter to initialize watchman configuration valriables --- node-util/sbin/oo-watchman | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/node-util/sbin/oo-watchman b/node-util/sbin/oo-watchman index f3a7e43495d..ef47b2318d1 100755 --- a/node-util/sbin/oo-watchman +++ b/node-util/sbin/oo-watchman @@ -72,10 +72,6 @@ module OpenShift @gears = gears @epoch = epoch - @retry_delay = 300 - @gear_retries = 3 - @retry_period = 28800 - @debug = false @logger = logger(config) @incidents = {} @@ -496,10 +492,11 @@ if ENV['DAEMONS_ARGV'] gears = OpenShift::Runtime::CachedGears.new(config, '/etc/passwd') watcher = OpenShift::Runtime::Watchman.new(config, gears) - watcher.gear_retries = ENV['GEAR_RETRIES'].to_i unless ENV['GEAR_RETRIES'].nil? - watcher.retry_delay = ENV['RETRY_DELAY'].to_i unless ENV['RETRY_DELAY'].nil? - watcher.retry_period = ENV['RETRY_PERIOD'].to_i unless ENV['RETRY_PERIOD'].nil? - watcher.debug = ENV['WATCHMAN_DEBUG'] unless ENV['WATCHMAN_DEBUG'].nil? + watcher.gear_retries = ENV['GEAR_RETRIES'] ? ENV['GEAR_RETRIES'].to_i : 3 + watcher.retry_delay = ENV['RETRY_DELAY'] ? ENV['RETRY_DELAY'].to_i : 300 + watcher.retry_period = ENV['RETRY_PERIOD'] ? ENV['RETRY_PERIOD'].to_i : 28800 + watcher.debug = ENV['WATCHMAN_DEBUG'] ? ENV['WATCHMAN_DEBUG'] : false + watcher.apply end end