Fix for polling queries (#7559)

* Fix for polling queries

* Revert changes due to https://github.com/apache/incubator-superset/pull/7575
This commit is contained in:
Beto Dealmeida 2019-05-23 09:17:00 -07:00 committed by GitHub
parent 9c8f494c9d
commit f68f979052
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 6 deletions

View File

@ -40,13 +40,8 @@ class QueryAutoRefresh extends React.PureComponent {
// if there are started or running queries, this method should return true
const { queries } = 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)
['running', 'started', 'pending', 'fetching'].indexOf(q.state) >= 0
);
return (