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.
This commit is contained in:
Michael Fitz-Payne 2022-04-27 14:42:35 +10:00 committed by GitHub
parent 0784c28702
commit 1acc4751ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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