{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-superset/pulls/comments/186480483","pull_request_review_id":118066607,"id":186480483,"diff_hunk":"@@ -19,10 +19,12 @@ class QueryAutoRefresh extends React.PureComponent {\n   shouldCheckForQueries() {\n     // if there are started or running queries, this method should return true\n     const { queries } = this.props;\n-    const queryKeys = Object.keys(queries);\n-    const queriesAsArray = queryKeys.map(key => queries[key]);\n-    return queriesAsArray.some(q =>\n-      ['running', 'started', 'pending', 'fetching'].indexOf(q.state) >= 0);\n+    const now = new Date().getTime();\n+    return Object.values(queries)\n+      .some(\n+        q => ['running', 'started', 'pending', 'fetching'].indexOf(q.state) >= 0 &&\n+        now - q.startDttm < 21600000,","path":"superset/assets/src/SqlLab/components/QueryAutoRefresh.jsx","position":12,"original_position":12,"commit_id":"a67faa0dd6164af80caacac58e5044f5fc7a4172","original_commit_id":"a67faa0dd6164af80caacac58e5044f5fc7a4172","user":{"login":"mistercrunch","id":487433,"avatar_url":"https://avatars1.githubusercontent.com/u/487433?v=4","gravatar_id":"","url":"https://api.github.com/users/mistercrunch","html_url":"https://github.com/mistercrunch","followers_url":"https://api.github.com/users/mistercrunch/followers","following_url":"https://api.github.com/users/mistercrunch/following{/other_user}","gists_url":"https://api.github.com/users/mistercrunch/gists{/gist_id}","starred_url":"https://api.github.com/users/mistercrunch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mistercrunch/subscriptions","organizations_url":"https://api.github.com/users/mistercrunch/orgs","repos_url":"https://api.github.com/users/mistercrunch/repos","events_url":"https://api.github.com/users/mistercrunch/events{/privacy}","received_events_url":"https://api.github.com/users/mistercrunch/received_events","type":"User","site_admin":false},"body":"No hard coded values please. Put it in `src/SqlLab/constants.js` ","created_at":"2018-05-07T16:51:06Z","updated_at":"2018-05-07T16:57:59Z","html_url":"https://github.com/apache/incubator-superset/pull/4833#discussion_r186480483","pull_request_url":"https://api.github.com/repos/apache/incubator-superset/pulls/4833","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-superset/pulls/comments/186480483"},"html":{"href":"https://github.com/apache/incubator-superset/pull/4833#discussion_r186480483"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-superset/pulls/4833"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-superset/pulls/4833","id":181998267,"html_url":"https://github.com/apache/incubator-superset/pull/4833","diff_url":"https://github.com/apache/incubator-superset/pull/4833.diff","patch_url":"https://github.com/apache/incubator-superset/pull/4833.patch","issue_url":"https://api.github.com/repos/apache/incubator-superset/issues/4833","number":4833,"state":"open","locked":false,"title":"[sqllab] Help sqllab forget query history","user":{"login":"timifasubaa","id":30888507,"avatar_url":"https://avatars2.githubusercontent.com/u/30888507?v=4","gravatar_id":"","url":"https://api.github.com/users/timifasubaa","html_url":"https://github.com/timifasubaa","followers_url":"https://api.github.com/users/timifasubaa/followers","following_url":"https://api.github.com/users/timifasubaa/following{/other_user}","gists_url":"https://api.github.com/users/timifasubaa/gists{/gist_id}","starred_url":"https://api.github.com/users/timifasubaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timifasubaa/subscriptions","organizations_url":"https://api.github.com/users/timifasubaa/orgs","repos_url":"https://api.github.com/users/timifasubaa/repos","events_url":"https://api.github.com/users/timifasubaa/events{/privacy}","received_events_url":"https://api.github.com/users/timifasubaa/received_events","type":"User","site_admin":false},"body":"In the sqllab asynchronous polling logic, it looks through the query history and continues to poll if there is a query in the history that is not successful. \r\n\r\nThis PR makes it look only at the last 6 hours of queries when checking for their states. The rationale is that a query that was started 6 hours ago is probably dead or problematic and should be rerun. \r\n\r\n@graceguo-supercat @mistercrunch @john-bodley ","created_at":"2018-04-16T21:50:46Z","updated_at":"2018-05-07T16:57:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8419af37cefae1c555d1374635f9cc166d77fee7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-superset/pulls/4833/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-superset/pulls/4833/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-superset/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-superset/issues/4833/comments","statuses_url":"https://api.github.com/repos/apache/incubator-superset/statuses/a67faa0dd6164af80caacac58e5044f5fc7a4172","head":{"label":"timifasubaa:help_sqllab_forget_the_past","ref":"help_sqllab_forget_the_past","sha":"a67faa0dd6164af80caacac58e5044f5fc7a4172","user":{"login":"timifasubaa","id":30888507,"avatar_url":"https://avatars2.githubusercontent.com/u/30888507?v=4","gravatar_id":"","url":"https://api.github.com/users/timifasubaa","html_url":"https://github.com/timifasubaa","followers_url":"https://api.github.com/users/timifasubaa/followers","following_url":"https://api.github.com/users/timifasubaa/following{/other_user}","gists_url":"https://api.github.com/users/timifasubaa/gists{/gist_id}","starred_url":"https://api.github.com/users/timifasubaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timifasubaa/subscriptions","organizations_url":"https://api.github.com/users/timifasubaa/orgs","repos_url":"https://api.github.com/users/timifasubaa/repos","events_url":"https://api.github.com/users/timifasubaa/events{/privacy}","received_events_url":"https://api.github.com/users/timifasubaa/received_events","type":"User","site_admin":false},"repo":{"id":99950916,"name":"incubator-superset","full_name":"timifasubaa/incubator-superset","owner":{"login":"timifasubaa","id":30888507,"avatar_url":"https://avatars2.githubusercontent.com/u/30888507?v=4","gravatar_id":"","url":"https://api.github.com/users/timifasubaa","html_url":"https://github.com/timifasubaa","followers_url":"https://api.github.com/users/timifasubaa/followers","following_url":"https://api.github.com/users/timifasubaa/following{/other_user}","gists_url":"https://api.github.com/users/timifasubaa/gists{/gist_id}","starred_url":"https://api.github.com/users/timifasubaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timifasubaa/subscriptions","organizations_url":"https://api.github.com/users/timifasubaa/orgs","repos_url":"https://api.github.com/users/timifasubaa/repos","events_url":"https://api.github.com/users/timifasubaa/events{/privacy}","received_events_url":"https://api.github.com/users/timifasubaa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/timifasubaa/incubator-superset","description":"Apache Superset (incubating) is a modern, enterprise-ready business intelligence web application","fork":true,"url":"https://api.github.com/repos/timifasubaa/incubator-superset","forks_url":"https://api.github.com/repos/timifasubaa/incubator-superset/forks","keys_url":"https://api.github.com/repos/timifasubaa/incubator-superset/keys{/key_id}","collaborators_url":"https://api.github.com/repos/timifasubaa/incubator-superset/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/timifasubaa/incubator-superset/teams","hooks_url":"https://api.github.com/repos/timifasubaa/incubator-superset/hooks","issue_events_url":"https://api.github.com/repos/timifasubaa/incubator-superset/issues/events{/number}","events_url":"https://api.github.com/repos/timifasubaa/incubator-superset/events","assignees_url":"https://api.github.com/repos/timifasubaa/incubator-superset/assignees{/user}","branches_url":"https://api.github.com/repos/timifasubaa/incubator-superset/branches{/branch}","tags_url":"https://api.github.com/repos/timifasubaa/incubator-superset/tags","blobs_url":"https://api.github.com/repos/timifasubaa/incubator-superset/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/timifasubaa/incubator-superset/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/timifasubaa/incubator-superset/git/refs{/sha}","trees_url":"https://api.github.com/repos/timifasubaa/incubator-superset/git/trees{/sha}","statuses_url":"https://api.github.com/repos/timifasubaa/incubator-superset/statuses/{sha}","languages_url":"https://api.github.com/repos/timifasubaa/incubator-superset/languages","stargazers_url":"https://api.github.com/repos/timifasubaa/incubator-superset/stargazers","contributors_url":"https://api.github.com/repos/timifasubaa/incubator-superset/contributors","subscribers_url":"https://api.github.com/repos/timifasubaa/incubator-superset/subscribers","subscription_url":"https://api.github.com/repos/timifasubaa/incubator-superset/subscription","commits_url":"https://api.github.com/repos/timifasubaa/incubator-superset/commits{/sha}","git_commits_url":"https://api.github.com/repos/timifasubaa/incubator-superset/git/commits{/sha}","comments_url":"https://api.github.com/repos/timifasubaa/incubator-superset/comments{/number}","issue_comment_url":"https://api.github.com/repos/timifasubaa/incubator-superset/issues/comments{/number}","contents_url":"https://api.github.com/repos/timifasubaa/incubator-superset/contents/{+path}","compare_url":"https://api.github.com/repos/timifasubaa/incubator-superset/compare/{base}...{head}","merges_url":"https://api.github.com/repos/timifasubaa/incubator-superset/merges","archive_url":"https://api.github.com/repos/timifasubaa/incubator-superset/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/timifasubaa/incubator-superset/downloads","issues_url":"https://api.github.com/repos/timifasubaa/incubator-superset/issues{/number}","pulls_url":"https://api.github.com/repos/timifasubaa/incubator-superset/pulls{/number}","milestones_url":"https://api.github.com/repos/timifasubaa/incubator-superset/milestones{/number}","notifications_url":"https://api.github.com/repos/timifasubaa/incubator-superset/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/timifasubaa/incubator-superset/labels{/name}","releases_url":"https://api.github.com/repos/timifasubaa/incubator-superset/releases{/id}","deployments_url":"https://api.github.com/repos/timifasubaa/incubator-superset/deployments","created_at":"2017-08-10T17:55:30Z","updated_at":"2018-03-30T18:30:00Z","pushed_at":"2018-04-29T00:24:45Z","git_url":"git://github.com/timifasubaa/incubator-superset.git","ssh_url":"git@github.com:timifasubaa/incubator-superset.git","clone_url":"https://github.com/timifasubaa/incubator-superset.git","svn_url":"https://github.com/timifasubaa/incubator-superset","homepage":"","size":82114,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"caa72675a5b69e0ba133a3e652e1f807e0163d9c","user":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":39464018,"name":"incubator-superset","full_name":"apache/incubator-superset","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/incubator-superset","description":"Apache Superset (incubating) is a modern, enterprise-ready business intelligence web application","fork":false,"url":"https://api.github.com/repos/apache/incubator-superset","forks_url":"https://api.github.com/repos/apache/incubator-superset/forks","keys_url":"https://api.github.com/repos/apache/incubator-superset/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-superset/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-superset/teams","hooks_url":"https://api.github.com/repos/apache/incubator-superset/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-superset/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-superset/events","assignees_url":"https://api.github.com/repos/apache/incubator-superset/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-superset/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-superset/tags","blobs_url":"https://api.github.com/repos/apache/incubator-superset/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-superset/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-superset/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-superset/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-superset/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-superset/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-superset/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-superset/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-superset/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-superset/subscription","commits_url":"https://api.github.com/repos/apache/incubator-superset/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-superset/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-superset/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-superset/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-superset/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-superset/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-superset/merges","archive_url":"https://api.github.com/repos/apache/incubator-superset/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-superset/downloads","issues_url":"https://api.github.com/repos/apache/incubator-superset/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-superset/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-superset/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-superset/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-superset/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-superset/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-superset/deployments","created_at":"2015-07-21T18:55:34Z","updated_at":"2018-05-07T16:36:12Z","pushed_at":"2018-05-07T15:51:37Z","git_url":"git://github.com/apache/incubator-superset.git","ssh_url":"git@github.com:apache/incubator-superset.git","clone_url":"https://github.com/apache/incubator-superset.git","svn_url":"https://github.com/apache/incubator-superset","homepage":"","size":83751,"stargazers_count":19049,"watchers_count":19049,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":3203,"mirror_url":null,"archived":false,"open_issues_count":646,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":3203,"open_issues":646,"watchers":19049,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-superset/pulls/4833"},"html":{"href":"https://github.com/apache/incubator-superset/pull/4833"},"issue":{"href":"https://api.github.com/repos/apache/incubator-superset/issues/4833"},"comments":{"href":"https://api.github.com/repos/apache/incubator-superset/issues/4833/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-superset/pulls/4833/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-superset/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-superset/pulls/4833/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-superset/statuses/a67faa0dd6164af80caacac58e5044f5fc7a4172"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mistercrunch"}}