forked from discourse/discourse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEV(cache_critical_dns): add caching for MessageBus Redis hostname
We are already caching any DB_HOST and REDIS_HOST (and their accompanying replicas), we should also cache the resolved addresses for the MessageBus specific Redis. This is a noop if no MB redis is defined in config. A side effect is that the MB will also support SRV lookup and priorities, following the same convention as the other cached services. The port argument was added to redis_healthcheck so that the script supports a setup where Redis is running on a non-default port. Did some minor refactoring to improve readability when filtering out the CRITICAL_HOST_ENV_VARS. The `select` block was a bit confusing, so the sequence was made easier to follow. We were coercing an environment variable to an int in a few places, so the `env_as_int` method was introduced to do that coercion in one place and for convenience purposes default to a value if provided. See /t/68301/30.
- Loading branch information
Showing
1 changed file
with
37 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters