Move feature flag utility function into superset/__init__.py

This commit is contained in:
Christine Chambers
2019-02-01 13:21:25 -08:00
parent b70a9ae524
commit 19b3753d2c
4 changed files with 18 additions and 36 deletions

View File

@@ -212,6 +212,14 @@ results_backend = app.config.get('RESULTS_BACKEND')
feature_flags = app.config.get('DEFAULT_FEATURE_FLAGS')
feature_flags.update(app.config.get('FEATURE_FLAGS') or {})
def is_feature_enabled(feature):
"""
Utility function for checking whether a feature is turned on
"""
return feature_flags.get(feature)
# Registering sources
module_datasource_map = app.config.get('DEFAULT_MODULE_DS_MAP')
module_datasource_map.update(app.config.get('ADDITIONAL_MODULE_DS_MAP'))