[sql lab] Fix new query stuck at pending state (#7523)

This commit is contained in:
Grace Guo 2019-05-16 15:22:23 -07:00 committed by GitHub
parent 9423e9a8be
commit 7f858e4566
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -38,7 +38,7 @@ class QueryAutoRefresh extends React.PureComponent {
}
shouldCheckForQueries() {
// if there are started or running queries, this method should return true
const { queries, queriesLastUpdate } = this.props;
const { queries } = this.props;
const now = new Date().getTime();
// due to a race condition, queries can be marked as successful before the
@ -50,7 +50,6 @@ class QueryAutoRefresh extends React.PureComponent {
);
return (
queriesLastUpdate > 0 &&
Object.values(queries).some(
q => isQueryRunning(q) &&
now - q.startDttm < MAX_QUERY_AGE_TO_POLL,