Fix admin dashboard crash on specific Elasticsearch connection errors (#34683)
This commit is contained in:
parent
e8e93b82f1
commit
1b68020331
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ class Admin::SystemCheck::ElasticsearchCheck < Admin::SystemCheck::BaseCheck
|
||||||
return true unless Chewy.enabled?
|
return true unless Chewy.enabled?
|
||||||
|
|
||||||
running_version.present? && compatible_version? && cluster_health['status'] == 'green' && indexes_match? && specifications_match? && preset_matches?
|
running_version.present? && compatible_version? && cluster_health['status'] == 'green' && indexes_match? && specifications_match? && preset_matches?
|
||||||
rescue Faraday::ConnectionFailed, Elasticsearch::Transport::Transport::Error
|
rescue Faraday::ConnectionFailed, Elasticsearch::Transport::Transport::Error, HTTPClient::KeepAliveDisconnected
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ class Admin::SystemCheck::ElasticsearchCheck < Admin::SystemCheck::BaseCheck
|
||||||
else
|
else
|
||||||
Admin::SystemCheck::Message.new(:elasticsearch_preset, nil, 'https://docs.joinmastodon.org/admin/elasticsearch/#scaling')
|
Admin::SystemCheck::Message.new(:elasticsearch_preset, nil, 'https://docs.joinmastodon.org/admin/elasticsearch/#scaling')
|
||||||
end
|
end
|
||||||
rescue Faraday::ConnectionFailed, Elasticsearch::Transport::Transport::Error
|
rescue Faraday::ConnectionFailed, Elasticsearch::Transport::Transport::Error, HTTPClient::KeepAliveDisconnected
|
||||||
Admin::SystemCheck::Message.new(:elasticsearch_running_check)
|
Admin::SystemCheck::Message.new(:elasticsearch_running_check)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue