You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2017/11/18 01:16:07 UTC
[GitHub] Mogball commented on a change in pull request #3897: [druid] Catch IOError when fetching Druid datasource time boundary
Mogball commented on a change in pull request #3897: [druid] Catch IOError when fetching Druid datasource time boundary
URL: https://github.com/apache/incubator-superset/pull/3897#discussion_r151822485
##########
File path: superset/connectors/druid/models.py
##########
@@ -563,11 +563,14 @@ def latest_metadata(self):
"""Returns segment metadata from the latest segment"""
logging.info('Syncing datasource [{}]'.format(self.datasource_name))
client = self.cluster.get_pydruid_client()
- results = client.time_boundary(datasource=self.datasource_name)
- if not results:
- return
- max_time = results[0]['result']['maxTime']
- max_time = dparse(max_time)
+ try:
+ results = client.time_boundary(datasource=self.datasource_name)
+ if not results:
Review comment:
Just noticed this now but we could fall back to `datetime.now()` when the function returns `None` as well
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services