Skip to content

Commit

Permalink
blacklist druid datasources to be refreshed because it takes forever …
Browse files Browse the repository at this point in the history
…to load all druid datasources metadata which is not even required (given the use cases user should be able to blacklist data sources which are not required to be refreshed). (#441)
  • Loading branch information
sid88in authored and mistercrunch committed May 6, 2016
1 parent d304ee0 commit 2f64c42
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions caravel/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion caravel/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 2f64c42

Please sign in to comment.