diff options
author | Claire <claire.github-309c@sitedethib.com> | 2023-01-18 17:38:11 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2023-01-18 17:38:11 +0100 |
commit | 60abcb3c4c4ba899f0b4bb477c1629ecc2cd4a59 (patch) | |
tree | 02c9edee1c75254299e5385966eb8508f6ec0670 /app/lib | |
parent | 472fd4307f9c963aba57e537e3ca3a8f94dfa139 (diff) | |
parent | 3588fbc76641311ab97ef530e2df4df4934805c5 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `config/i18n-tasks.yml`: Upstream added new ignored strings, glitch-soc has extra ignored strings because of the theming system. Added upstream's changes.
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/admin/system_check/elasticsearch_check.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/lib/admin/system_check/elasticsearch_check.rb b/app/lib/admin/system_check/elasticsearch_check.rb index 7f922978f..5b4c12399 100644 --- a/app/lib/admin/system_check/elasticsearch_check.rb +++ b/app/lib/admin/system_check/elasticsearch_check.rb @@ -30,19 +30,24 @@ class Admin::SystemCheck::ElasticsearchCheck < Admin::SystemCheck::BaseCheck def running_version @running_version ||= begin - Chewy.client.info['version']['minimum_wire_compatibility_version'] || - Chewy.client.info['version']['number'] + Chewy.client.info['version']['number'] rescue Faraday::ConnectionFailed nil end end + def compatible_wire_version + Chewy.client.info['version']['minimum_wire_compatibility_version'] + end + def required_version '7.x' end def compatible_version? return false if running_version.nil? - Gem::Version.new(running_version) >= Gem::Version.new(required_version) + + Gem::Version.new(running_version) >= Gem::Version.new(required_version) || + Gem::Version.new(compatible_wire_version) >= Gem::Version.new(required_version) end end |