{"action":"created","comment":{"url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/pulls/comments/227748758","pull_request_review_id":167857746,"id":227748758,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNzc0ODc1OA==","diff_hunk":"@@ -11,6 +12,45 @@ module.exports = function () {\n   const newCache = loadCacheFromDisk(\"newCache\");\n   const oldCache = loadCacheFromDisk(\"oldCache\");\n \n+  const cacheUpdateQueue = async.queue((task, callback) => {\n+    request(formRequest(task.url), (error, response, body) => {\n+      if (error !== null) {\n+        console.error(\"Error getting: %s\", task.url, error, body);\n+        if (task.deferred) task.deferred.reject(formErrorResponse(error, response, body));\n+      } else if (response.statusCode === 200) {\n+        console.log(\"Updating cached: %s\", task.url);","path":"app/lib/github_file_cache.js","position":18,"original_position":18,"commit_id":"8dc209c15665de136eaacaeead24f56d233a49f4","original_commit_id":"8dc209c15665de136eaacaeead24f56d233a49f4","user":{"login":"johnoliver","id":1615532,"node_id":"MDQ6VXNlcjE2MTU1MzI=","avatar_url":"https://avatars2.githubusercontent.com/u/1615532?v=4","gravatar_id":"","url":"https://api.github.com/users/johnoliver","html_url":"https://github.com/johnoliver","followers_url":"https://api.github.com/users/johnoliver/followers","following_url":"https://api.github.com/users/johnoliver/following{/other_user}","gists_url":"https://api.github.com/users/johnoliver/gists{/gist_id}","starred_url":"https://api.github.com/users/johnoliver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnoliver/subscriptions","organizations_url":"https://api.github.com/users/johnoliver/orgs","repos_url":"https://api.github.com/users/johnoliver/repos","events_url":"https://api.github.com/users/johnoliver/events{/privacy}","received_events_url":"https://api.github.com/users/johnoliver/received_events","type":"User","site_admin":false},"body":"I would get rid of the logging, it was a debug thing that should have been removed before commiting","created_at":"2018-10-24T11:30:26Z","updated_at":"2018-10-24T11:30:27Z","html_url":"https://github.com/AdoptOpenJDK/openjdk-api/pull/99#discussion_r227748758","pull_request_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/pulls/99","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/pulls/comments/227748758"},"html":{"href":"https://github.com/AdoptOpenJDK/openjdk-api/pull/99#discussion_r227748758"},"pull_request":{"href":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/pulls/99"}},"in_reply_to_id":227685703},"pull_request":{"url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/pulls/99","id":225242386,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1MjQyMzg2","html_url":"https://github.com/AdoptOpenJDK/openjdk-api/pull/99","diff_url":"https://github.com/AdoptOpenJDK/openjdk-api/pull/99.diff","patch_url":"https://github.com/AdoptOpenJDK/openjdk-api/pull/99.patch","issue_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/issues/99","number":99,"state":"open","locked":false,"title":"GitHub cache update queue","user":{"login":"supahgreg","id":288958,"node_id":"MDQ6VXNlcjI4ODk1OA==","avatar_url":"https://avatars2.githubusercontent.com/u/288958?v=4","gravatar_id":"","url":"https://api.github.com/users/supahgreg","html_url":"https://github.com/supahgreg","followers_url":"https://api.github.com/users/supahgreg/followers","following_url":"https://api.github.com/users/supahgreg/following{/other_user}","gists_url":"https://api.github.com/users/supahgreg/gists{/gist_id}","starred_url":"https://api.github.com/users/supahgreg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supahgreg/subscriptions","organizations_url":"https://api.github.com/users/supahgreg/orgs","repos_url":"https://api.github.com/users/supahgreg/repos","events_url":"https://api.github.com/users/supahgreg/events{/privacy}","received_events_url":"https://api.github.com/users/supahgreg/received_events","type":"User","site_admin":false},"body":"This PR reworks `app/lib/github_file_cache.js` a bit so client responses aren't often tied to completion of GitHub API requests, cutting down response times.\r\n\r\nThis also includes backing off of requests to non-existent things (i.e. HTTP 404), timeouts, etc.","created_at":"2018-10-24T02:09:46Z","updated_at":"2018-10-24T11:30:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1224bc442e758fae739e2a1a43d3e0dec156e343","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":594613693,"node_id":"MDU6TGFiZWw1OTQ2MTM2OTM=","url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/labels/bug","name":"bug","color":"ee0701","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/pulls/99/commits","review_comments_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/pulls/99/comments","review_comment_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/issues/99/comments","statuses_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/statuses/8dc209c15665de136eaacaeead24f56d233a49f4","head":{"label":"supahgreg:github-cache-update-queue","ref":"github-cache-update-queue","sha":"8dc209c15665de136eaacaeead24f56d233a49f4","user":{"login":"supahgreg","id":288958,"node_id":"MDQ6VXNlcjI4ODk1OA==","avatar_url":"https://avatars2.githubusercontent.com/u/288958?v=4","gravatar_id":"","url":"https://api.github.com/users/supahgreg","html_url":"https://github.com/supahgreg","followers_url":"https://api.github.com/users/supahgreg/followers","following_url":"https://api.github.com/users/supahgreg/following{/other_user}","gists_url":"https://api.github.com/users/supahgreg/gists{/gist_id}","starred_url":"https://api.github.com/users/supahgreg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supahgreg/subscriptions","organizations_url":"https://api.github.com/users/supahgreg/orgs","repos_url":"https://api.github.com/users/supahgreg/repos","events_url":"https://api.github.com/users/supahgreg/events{/privacy}","received_events_url":"https://api.github.com/users/supahgreg/received_events","type":"User","site_admin":false},"repo":{"id":154042964,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQwNDI5NjQ=","name":"openjdk-api","full_name":"supahgreg/openjdk-api","private":false,"owner":{"login":"supahgreg","id":288958,"node_id":"MDQ6VXNlcjI4ODk1OA==","avatar_url":"https://avatars2.githubusercontent.com/u/288958?v=4","gravatar_id":"","url":"https://api.github.com/users/supahgreg","html_url":"https://github.com/supahgreg","followers_url":"https://api.github.com/users/supahgreg/followers","following_url":"https://api.github.com/users/supahgreg/following{/other_user}","gists_url":"https://api.github.com/users/supahgreg/gists{/gist_id}","starred_url":"https://api.github.com/users/supahgreg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supahgreg/subscriptions","organizations_url":"https://api.github.com/users/supahgreg/orgs","repos_url":"https://api.github.com/users/supahgreg/repos","events_url":"https://api.github.com/users/supahgreg/events{/privacy}","received_events_url":"https://api.github.com/users/supahgreg/received_events","type":"User","site_admin":false},"html_url":"https://github.com/supahgreg/openjdk-api","description":"The source code for the Express.js API :turtle:","fork":true,"url":"https://api.github.com/repos/supahgreg/openjdk-api","forks_url":"https://api.github.com/repos/supahgreg/openjdk-api/forks","keys_url":"https://api.github.com/repos/supahgreg/openjdk-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/supahgreg/openjdk-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/supahgreg/openjdk-api/teams","hooks_url":"https://api.github.com/repos/supahgreg/openjdk-api/hooks","issue_events_url":"https://api.github.com/repos/supahgreg/openjdk-api/issues/events{/number}","events_url":"https://api.github.com/repos/supahgreg/openjdk-api/events","assignees_url":"https://api.github.com/repos/supahgreg/openjdk-api/assignees{/user}","branches_url":"https://api.github.com/repos/supahgreg/openjdk-api/branches{/branch}","tags_url":"https://api.github.com/repos/supahgreg/openjdk-api/tags","blobs_url":"https://api.github.com/repos/supahgreg/openjdk-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/supahgreg/openjdk-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/supahgreg/openjdk-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/supahgreg/openjdk-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/supahgreg/openjdk-api/statuses/{sha}","languages_url":"https://api.github.com/repos/supahgreg/openjdk-api/languages","stargazers_url":"https://api.github.com/repos/supahgreg/openjdk-api/stargazers","contributors_url":"https://api.github.com/repos/supahgreg/openjdk-api/contributors","subscribers_url":"https://api.github.com/repos/supahgreg/openjdk-api/subscribers","subscription_url":"https://api.github.com/repos/supahgreg/openjdk-api/subscription","commits_url":"https://api.github.com/repos/supahgreg/openjdk-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/supahgreg/openjdk-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/supahgreg/openjdk-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/supahgreg/openjdk-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/supahgreg/openjdk-api/contents/{+path}","compare_url":"https://api.github.com/repos/supahgreg/openjdk-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/supahgreg/openjdk-api/merges","archive_url":"https://api.github.com/repos/supahgreg/openjdk-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/supahgreg/openjdk-api/downloads","issues_url":"https://api.github.com/repos/supahgreg/openjdk-api/issues{/number}","pulls_url":"https://api.github.com/repos/supahgreg/openjdk-api/pulls{/number}","milestones_url":"https://api.github.com/repos/supahgreg/openjdk-api/milestones{/number}","notifications_url":"https://api.github.com/repos/supahgreg/openjdk-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/supahgreg/openjdk-api/labels{/name}","releases_url":"https://api.github.com/repos/supahgreg/openjdk-api/releases{/id}","deployments_url":"https://api.github.com/repos/supahgreg/openjdk-api/deployments","created_at":"2018-10-21T19:09:32Z","updated_at":"2018-10-21T19:09:34Z","pushed_at":"2018-10-24T02:04:44Z","git_url":"git://github.com/supahgreg/openjdk-api.git","ssh_url":"git@github.com:supahgreg/openjdk-api.git","clone_url":"https://github.com/supahgreg/openjdk-api.git","svn_url":"https://github.com/supahgreg/openjdk-api","homepage":"https://api.adoptopenjdk.net","size":323,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"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","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"AdoptOpenJDK:master","ref":"master","sha":"6531fb1b414582d31428593fafb5d0aa95c5acc7","user":{"login":"AdoptOpenJDK","id":1673867,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NzM4Njc=","avatar_url":"https://avatars0.githubusercontent.com/u/1673867?v=4","gravatar_id":"","url":"https://api.github.com/users/AdoptOpenJDK","html_url":"https://github.com/AdoptOpenJDK","followers_url":"https://api.github.com/users/AdoptOpenJDK/followers","following_url":"https://api.github.com/users/AdoptOpenJDK/following{/other_user}","gists_url":"https://api.github.com/users/AdoptOpenJDK/gists{/gist_id}","starred_url":"https://api.github.com/users/AdoptOpenJDK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdoptOpenJDK/subscriptions","organizations_url":"https://api.github.com/users/AdoptOpenJDK/orgs","repos_url":"https://api.github.com/users/AdoptOpenJDK/repos","events_url":"https://api.github.com/users/AdoptOpenJDK/events{/privacy}","received_events_url":"https://api.github.com/users/AdoptOpenJDK/received_events","type":"Organization","site_admin":false},"repo":{"id":89795477,"node_id":"MDEwOlJlcG9zaXRvcnk4OTc5NTQ3Nw==","name":"openjdk-api","full_name":"AdoptOpenJDK/openjdk-api","private":false,"owner":{"login":"AdoptOpenJDK","id":1673867,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NzM4Njc=","avatar_url":"https://avatars0.githubusercontent.com/u/1673867?v=4","gravatar_id":"","url":"https://api.github.com/users/AdoptOpenJDK","html_url":"https://github.com/AdoptOpenJDK","followers_url":"https://api.github.com/users/AdoptOpenJDK/followers","following_url":"https://api.github.com/users/AdoptOpenJDK/following{/other_user}","gists_url":"https://api.github.com/users/AdoptOpenJDK/gists{/gist_id}","starred_url":"https://api.github.com/users/AdoptOpenJDK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdoptOpenJDK/subscriptions","organizations_url":"https://api.github.com/users/AdoptOpenJDK/orgs","repos_url":"https://api.github.com/users/AdoptOpenJDK/repos","events_url":"https://api.github.com/users/AdoptOpenJDK/events{/privacy}","received_events_url":"https://api.github.com/users/AdoptOpenJDK/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/AdoptOpenJDK/openjdk-api","description":"The source code for the Express.js API :turtle:","fork":false,"url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api","forks_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/forks","keys_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/teams","hooks_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/hooks","issue_events_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/issues/events{/number}","events_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/events","assignees_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/assignees{/user}","branches_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/branches{/branch}","tags_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/tags","blobs_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/statuses/{sha}","languages_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/languages","stargazers_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/stargazers","contributors_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/contributors","subscribers_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/subscribers","subscription_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/subscription","commits_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/contents/{+path}","compare_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/merges","archive_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/downloads","issues_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/issues{/number}","pulls_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/pulls{/number}","milestones_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/milestones{/number}","notifications_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/labels{/name}","releases_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/releases{/id}","deployments_url":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/deployments","created_at":"2017-04-29T15:48:15Z","updated_at":"2018-10-23T12:10:53Z","pushed_at":"2018-10-24T02:09:46Z","git_url":"git://github.com/AdoptOpenJDK/openjdk-api.git","ssh_url":"git@github.com:AdoptOpenJDK/openjdk-api.git","clone_url":"https://github.com/AdoptOpenJDK/openjdk-api.git","svn_url":"https://github.com/AdoptOpenJDK/openjdk-api","homepage":"https://api.adoptopenjdk.net","size":313,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":11,"open_issues":10,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/pulls/99"},"html":{"href":"https://github.com/AdoptOpenJDK/openjdk-api/pull/99"},"issue":{"href":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/issues/99"},"comments":{"href":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/issues/99/comments"},"review_comments":{"href":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/pulls/99/comments"},"review_comment":{"href":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/pulls/99/commits"},"statuses":{"href":"https://api.github.com/repos/AdoptOpenJDK/openjdk-api/statuses/8dc209c15665de136eaacaeead24f56d233a49f4"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"johnoliver"}}