From cbf7d16d7cc45808ebbfa15b3df2596753760623 Mon Sep 17 00:00:00 2001 From: Michael Fitz-Payne Date: Wed, 27 Apr 2022 14:42:35 +1000 Subject: [PATCH] FIX: remove refresh seconds override on cache_critical_dns (#16572) This removes the option to override the sleep time between caching of DNS records. The override was invalid because `''.to_i` is 0 in Ruby, causing a tight loop calling the `run` method. --- script/cache_critical_dns | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/cache_critical_dns b/script/cache_critical_dns index f496230e7ec..a0307781a7d 100755 --- a/script/cache_critical_dns +++ b/script/cache_critical_dns @@ -23,7 +23,7 @@ CRITICAL_HOST_ENV_VARS = %w{ HOST_RESOLVER_CACHE = {} HOST_HEALTHY_CACHE = {} HOSTS_PATH = ENV['DISCOURSE_DNS_CACHE_HOSTS_FILE'] || "/etc/hosts" -REFRESH_SECONDS = ENV['DISCOURSE_DNS_CACHE_REFRESH_SECONDS'].to_i || 30 +REFRESH_SECONDS = 30 module DNSClient def dns_client_with_timeout