Skip to content

Commit

Permalink
fix: support ES_PREFIX in self_test
Browse files Browse the repository at this point in the history
  • Loading branch information
yukimochi committed Aug 22, 2023
1 parent 1a4b5a2 commit 765527f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/lib/admin/system_check/elasticsearch_check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def message
Admin::SystemCheck::Message.new(:elasticsearch_health_red)
elsif cluster_health['number_of_nodes'] < 2 && es_preset != 'single_node_cluster'
Admin::SystemCheck::Message.new(:elasticsearch_preset_single_node, nil, 'https://docs.joinmastodon.org/admin/optional/elasticsearch/#scaling')
elsif Chewy.client.indices.get_settings['chewy_specifications'].dig('settings', 'index', 'number_of_replicas')&.to_i&.positive? && es_preset == 'single_node_cluster'
elsif Chewy.client.indices.get_settings["#{Chewy.settings[:prefix] ? Chewy.settings[:prefix] + '_' : ''}chewy_specifications"].dig('settings', 'index', 'number_of_replicas')&.to_i&.positive? && es_preset == 'single_node_cluster'
Admin::SystemCheck::Message.new(:elasticsearch_reset_chewy)
elsif cluster_health['status'] == 'yellow'
Admin::SystemCheck::Message.new(:elasticsearch_health_yellow)
Expand Down

0 comments on commit 765527f

Please sign in to comment.