From 09fbc27981641bb0f830fb9bf2cd68a59084959b Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 11 Jan 2023 22:16:13 +0100 Subject: [PATCH] Added optional feature-flag files --- kdb-bot/src/bot/config | 2 +- kdb-bot/src/bot/startup_settings_extension.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/kdb-bot/src/bot/config b/kdb-bot/src/bot/config index 9262f4f8..28bd879d 160000 --- a/kdb-bot/src/bot/config +++ b/kdb-bot/src/bot/config @@ -1 +1 @@ -Subproject commit 9262f4f88f68f8461cfbc0a5ef3f4d89edf78c7b +Subproject commit 28bd879dab2e5ea6ca8bb38e44c7786eb67cb7a2 diff --git a/kdb-bot/src/bot/startup_settings_extension.py b/kdb-bot/src/bot/startup_settings_extension.py index 655ccd7b..71896c69 100644 --- a/kdb-bot/src/bot/startup_settings_extension.py +++ b/kdb-bot/src/bot/startup_settings_extension.py @@ -31,6 +31,8 @@ class StartupSettingsExtension(StartupExtensionABC): configuration.add_json_file(f'config/appsettings.{environment.host_name}.json', optional=True) # load feature-flags configuration.add_json_file(f'config/feature-flags.json', optional=False) + configuration.add_json_file(f'config/feature-flags.{environment.environment_name}.json', optional=True) + configuration.add_json_file(f'config/feature-flags.{environment.host_name}.json', optional=True) configuration.add_configuration('Startup_StartTime', str(self._start_time)) self._configure_settings_with_sub_settings(configuration, BotSettings, lambda x: x.servers, lambda x: x.id) -- 2.45.2