mirror of
https://github.com/discourse/discourse.git
synced 2024-12-04 03:33:44 +08:00
971409741f
Modify the cache_critical_dns script for SRV RR awareness. The new
behaviour is only enabled when one or more of the following environment
variables are present (and only for a host where the `DISCOURSE_*_HOST_SRV`
variable is present):
- `DISCOURSE_DB_HOST_SRV`
- `DISCOURSE_DB_REPLICA_HOST_SRV`
- `DISCOURSE_REDIS_HOST_SRV`
- `DISCOURSE_REDIS_REPLICA_HOST_SRV`
Some minor changes in refactor to original script behaviour:
- add Name and SRVName classes for storing resolved addresses for a hostname
- pass DNS client into main run loop instead of creating inside the loop
- ensure all times are UTC
- add environment override for system hosts file path and time between DNS
checks mainly for testing purposes
The environment variable for `BUNDLE_GEMFILE` is set to enables Ruby to
load gems that are installed and vendored via the project's Gemfile.
This script is usually not run from the project directory as it is
configured as a system service (see
|
||
---|---|---|
.. | ||
benchmarks | ||
bulk_import | ||
demon_test | ||
import_scripts | ||
.gitignore | ||
alice.txt | ||
analyze_sidekiq_queues.rb | ||
bench.rb | ||
biggest_objects.rb | ||
boot_mem.rb | ||
cache_critical_dns | ||
check_forking.rb | ||
compile_hbs.rb | ||
copyright-deposit | ||
db_timestamps_mover.rb | ||
diff_heaps.rb | ||
discourse | ||
docker_test.rb | ||
downsize_uploads.rb | ||
i18n_lint.rb | ||
measure.rb | ||
memory-analysis | ||
memstats.rb | ||
micro_bench.rb | ||
mwrap_sidekiq | ||
profile_db_generator.rb | ||
promote_migrations | ||
rails | ||
redis_memory.rb | ||
require_profiler.rb | ||
spawn_backup_restore.rb | ||
start_test_db.rb | ||
switch_container_ruby | ||
test_email_settings.rb | ||
test_hbs_compiler.rb | ||
test_mem.rb | ||
test_memory_leak.rb | ||
test_pretty_text.rb | ||
thread_detective.rb | ||
user_simulator.rb |