john-bodley 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_r151827678
 
 

 ##########
 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:
   @Mogball I updated the logic per your comment. PTAL.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to