chore: revert GlobalConfig changes (#3702)

Priority to GlobalConfig changes are reverted and for the time being, env vars will take precedence if set.

Fixes #3699
This commit is contained in:
Vishnu Narayanan
2022-01-12 08:50:23 +05:30
committed by GitHub
parent f44be0b1e6
commit acba07cf6e
4 changed files with 59 additions and 59 deletions

View File

@@ -1,7 +1,7 @@
class GlobalConfigService
def self.load(config_key, default_value)
config = GlobalConfig.get(config_key)
return config[config_key] if config[config_key].present?
config = ENV[config_key] || GlobalConfig.get(config_key)[config_key]
return config if config.present?
# To support migrating existing instance relying on env variables
# TODO: deprecate this later down the line