superset-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-superset] graceguo-supercat commented on a change in pull request #7446: feat: Scheduling queries from SQL Lab (#7416)
Date Thu, 16 May 2019 01:49:07 GMT
graceguo-supercat commented on a change in pull request #7446: feat: Scheduling queries from
SQL Lab (#7416)
URL: https://github.com/apache/incubator-superset/pull/7446#discussion_r284513097
 
 

 ##########
 File path: superset/assets/src/SqlLab/components/QueryAutoRefresh.jsx
 ##########
 @@ -41,10 +41,18 @@ class QueryAutoRefresh extends React.PureComponent {
     const { queries, queriesLastUpdate } = this.props;
     const now = new Date().getTime();
 
+    // due to a race condition, queries can be marked as successful before the
+    // results key is set; this is a workaround until we fix the underlying
+    // problem
+    const isQueryRunning = q => (
+      ['running', 'started', 'pending', 'fetching'].indexOf(q.state) >= 0 ||
+      (q.state === 'success' && q.resultsKey === null)
 
 Review comment:
   @DiggidyDave this logic is problematic. Sql Lab can run async and synchronous queries.
For synchronous queries, it will not never have resultsKey stored in query table.
   
   the new logic will make extra polling happen when user has at least 1 tab has synchronous
query (and < 6 hours old).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Mime
View raw message