discourse/script
Michael Fitz-Payne 29f0bc4ea2 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.
2022-10-26 09:22:20 +10:00
..
benchmarks DEV: Fix rubocop issues (#14715) 2021-10-27 11:39:28 +03:00
bulk_import DEV: Fix methods removed in Ruby 3.2 (#15459) 2022-01-05 18:45:08 +01:00
demon_test
import_scripts DEV: Fix methods removed in Ruby 3.2 (#15459) 2022-01-05 18:45:08 +01:00
.gitignore
alice.txt
analyze_sidekiq_queues.rb
bench.rb DEV: Fix methods removed in Ruby 3.2 (#15459) 2022-01-05 18:45:08 +01:00
biggest_objects.rb
boot_mem.rb
cache_critical_dns DEV(cache_critical_dns): add caching for MessageBus Redis hostname 2022-10-26 09:22:20 +10:00
check_forking.rb
compile_hbs.rb Rename the server side widget hbs compiler 2020-03-27 12:06:14 -04:00
copyright-deposit Add script for compiling copyright deposits (#9646) 2020-05-06 12:51:45 -04:00
db_timestamps_mover.rb DEV: Make db_timestamp_mover work with tables with unique constraints (#14027) 2021-08-12 19:24:21 +04:00
diff_heaps.rb
discourse DEV: Fix thor deprecation warning (#14680) 2021-10-21 21:01:05 +02:00
docker_test.rb DEV: Remove the remaining Travis code (#13255) 2021-06-02 20:29:47 +02:00
downsize_uploads.rb FIX: Ambiguous column in downsize_uploads (#14972) 2021-11-16 16:23:32 +01:00
i18n_lint.rb DEV: Clean up and refactor CI workflow(s) (#12144) 2021-02-22 10:28:32 +01:00
measure.rb
memory-analysis
memstats.rb DEV: Fix rubocop issues (#14715) 2021-10-27 11:39:28 +03:00
micro_bench.rb
mwrap_sidekiq PERF: avoid shelling to get hostname aggressively 2020-02-18 15:13:19 +11:00
profile_db_generator.rb FIX: ensure we consistently pick the same topic for bench 2020-01-08 16:33:45 +11:00
promote_migrations DEV: Update script/promote_migrations (#13513) 2021-06-24 13:57:23 +01:00
rails
redis_memory.rb DEV: s/\$redis/Discourse\.redis (#8431) 2019-12-03 10:05:53 +01:00
require_profiler.rb
spawn_backup_restore.rb FIX: Killing a Unicorn worker shouldn't kill a running backup or restore process 2020-10-13 19:48:53 +02:00
start_test_db.rb DEV: Wait for initdb to complete in docker.rake (#15614) 2022-01-17 17:45:39 +00:00
switch_container_ruby
test_email_settings.rb
test_hbs_compiler.rb REFACTOR: Remove Discourse.__widget_helpers 2020-08-06 14:35:46 -04:00
test_mem.rb
test_memory_leak.rb
test_pretty_text.rb
thread_detective.rb
user_simulator.rb