diff --git a/caravel/config.py b/caravel/config.py index 2c43513a76c1a..99b3fb1940736 100644 --- a/caravel/config.py +++ b/caravel/config.py @@ -132,6 +132,12 @@ VIZ_TYPE_BLACKLIST = [] +# --------------------------------------------------- +# List of data sources not to be refreshed in druid cluster +# --------------------------------------------------- + +DRUID_DATA_SOURCE_BLACKLIST = [] + """ 1) http://docs.python-guide.org/en/latest/writing/logging/ 2) https://docs.python.org/2/library/logging.config.html diff --git a/caravel/models.py b/caravel/models.py index b934df94adbf4..49f5584d173c6 100644 --- a/caravel/models.py +++ b/caravel/models.py @@ -903,7 +903,8 @@ def get_datasources(self): def refresh_datasources(self): for datasource in self.get_datasources(): - DruidDatasource.sync_to_db(datasource, self) + if datasource not in config.get('DRUID_DATA_SOURCE_BLACKLIST'): + DruidDatasource.sync_to_db(datasource, self) class DruidDatasource(Model, AuditMixinNullable, Queryable):