You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/05/17 20:53:09 UTC

[GitHub] [incubator-superset] betodealmeida commented on a change in pull request #7446: feat: Scheduling queries from SQL Lab (#7416)

betodealmeida 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_r285285395
 
 

 ##########
 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:
   Ah, my bad. I'll fix it.

----------------------------------------------------------------
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