{"action":"created","comment":{"url":"https://api.github.com/repos/graphprotocol/graph-node/pulls/comments/242927166","pull_request_review_id":186558859,"id":242927166,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MjkyNzE2Ng==","diff_hunk":"@@ -81,14 +82,25 @@ impl Store {\n         // Create a store-specific logger\n         let logger = logger.new(o!(\"component\" => \"Store\"));\n \n-        // Connect to Postgres\n-        let conn = PgConnection::establish(config.postgres_url.as_str())\n-            .expect(\"failed to connect to Postgres\");\n+        #[derive(Debug)]\n+        struct ErrorHandler(Logger);\n+        impl r2d2::HandleError<r2d2::Error> for ErrorHandler {\n+            fn handle_error(&self, error: r2d2::Error) {\n+                error!(self.0, \"postgres connection error\"; \"error\" => error.to_string())","path":"store/postgres/src/store.rs","position":28,"original_position":28,"commit_id":"bbe77c7b4cbf56cecce62131a6ea5a6e8f824d00","original_commit_id":"bbe77c7b4cbf56cecce62131a6ea5a6e8f824d00","user":{"login":"Jannis","id":19324,"node_id":"MDQ6VXNlcjE5MzI0","avatar_url":"https://avatars0.githubusercontent.com/u/19324?v=4","gravatar_id":"","url":"https://api.github.com/users/Jannis","html_url":"https://github.com/Jannis","followers_url":"https://api.github.com/users/Jannis/followers","following_url":"https://api.github.com/users/Jannis/following{/other_user}","gists_url":"https://api.github.com/users/Jannis/gists{/gist_id}","starred_url":"https://api.github.com/users/Jannis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jannis/subscriptions","organizations_url":"https://api.github.com/users/Jannis/orgs","repos_url":"https://api.github.com/users/Jannis/repos","events_url":"https://api.github.com/users/Jannis/events{/privacy}","received_events_url":"https://api.github.com/users/Jannis/received_events","type":"User","site_admin":false},"body":"Our log messages start with a capital letter. 😉 ","created_at":"2018-12-19T14:05:59Z","updated_at":"2018-12-19T14:07:27Z","html_url":"https://github.com/graphprotocol/graph-node/pull/650#discussion_r242927166","pull_request_url":"https://api.github.com/repos/graphprotocol/graph-node/pulls/650","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/graphprotocol/graph-node/pulls/comments/242927166"},"html":{"href":"https://github.com/graphprotocol/graph-node/pull/650#discussion_r242927166"},"pull_request":{"href":"https://api.github.com/repos/graphprotocol/graph-node/pulls/650"}}},"pull_request":{"url":"https://api.github.com/repos/graphprotocol/graph-node/pulls/650","id":239159050,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM5MTU5MDUw","html_url":"https://github.com/graphprotocol/graph-node/pull/650","diff_url":"https://github.com/graphprotocol/graph-node/pull/650.diff","patch_url":"https://github.com/graphprotocol/graph-node/pull/650.patch","issue_url":"https://api.github.com/repos/graphprotocol/graph-node/issues/650","number":650,"state":"open","locked":false,"title":"Use a DB connection pool","user":{"login":"leodasvacas","id":9885558,"node_id":"MDQ6VXNlcjk4ODU1NTg=","avatar_url":"https://avatars3.githubusercontent.com/u/9885558?v=4","gravatar_id":"","url":"https://api.github.com/users/leodasvacas","html_url":"https://github.com/leodasvacas","followers_url":"https://api.github.com/users/leodasvacas/followers","following_url":"https://api.github.com/users/leodasvacas/following{/other_user}","gists_url":"https://api.github.com/users/leodasvacas/gists{/gist_id}","starred_url":"https://api.github.com/users/leodasvacas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leodasvacas/subscriptions","organizations_url":"https://api.github.com/users/leodasvacas/orgs","repos_url":"https://api.github.com/users/leodasvacas/repos","events_url":"https://api.github.com/users/leodasvacas/events{/privacy}","received_events_url":"https://api.github.com/users/leodasvacas/received_events","type":"User","site_admin":false},"body":"Resolves #396. I didn't tweak the pool configurations, in the spirit of \"any pooling is better than no pooling\". But it'd be good if those who know more about DBs could take a look at the [builder defaults](https://docs.diesel.rs/r2d2/struct.Builder.html) and check if they're ok for our use. We can fine tune later.","created_at":"2018-12-17T14:15:11Z","updated_at":"2018-12-19T14:07:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c1559d9f58ab6146a75805d2d073209c39359480","assignee":{"login":"leodasvacas","id":9885558,"node_id":"MDQ6VXNlcjk4ODU1NTg=","avatar_url":"https://avatars3.githubusercontent.com/u/9885558?v=4","gravatar_id":"","url":"https://api.github.com/users/leodasvacas","html_url":"https://github.com/leodasvacas","followers_url":"https://api.github.com/users/leodasvacas/followers","following_url":"https://api.github.com/users/leodasvacas/following{/other_user}","gists_url":"https://api.github.com/users/leodasvacas/gists{/gist_id}","starred_url":"https://api.github.com/users/leodasvacas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leodasvacas/subscriptions","organizations_url":"https://api.github.com/users/leodasvacas/orgs","repos_url":"https://api.github.com/users/leodasvacas/repos","events_url":"https://api.github.com/users/leodasvacas/events{/privacy}","received_events_url":"https://api.github.com/users/leodasvacas/received_events","type":"User","site_admin":false},"assignees":[{"login":"leodasvacas","id":9885558,"node_id":"MDQ6VXNlcjk4ODU1NTg=","avatar_url":"https://avatars3.githubusercontent.com/u/9885558?v=4","gravatar_id":"","url":"https://api.github.com/users/leodasvacas","html_url":"https://github.com/leodasvacas","followers_url":"https://api.github.com/users/leodasvacas/followers","following_url":"https://api.github.com/users/leodasvacas/following{/other_user}","gists_url":"https://api.github.com/users/leodasvacas/gists{/gist_id}","starred_url":"https://api.github.com/users/leodasvacas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leodasvacas/subscriptions","organizations_url":"https://api.github.com/users/leodasvacas/orgs","repos_url":"https://api.github.com/users/leodasvacas/repos","events_url":"https://api.github.com/users/leodasvacas/events{/privacy}","received_events_url":"https://api.github.com/users/leodasvacas/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"fordN","id":1591297,"node_id":"MDQ6VXNlcjE1OTEyOTc=","avatar_url":"https://avatars3.githubusercontent.com/u/1591297?v=4","gravatar_id":"","url":"https://api.github.com/users/fordN","html_url":"https://github.com/fordN","followers_url":"https://api.github.com/users/fordN/followers","following_url":"https://api.github.com/users/fordN/following{/other_user}","gists_url":"https://api.github.com/users/fordN/gists{/gist_id}","starred_url":"https://api.github.com/users/fordN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fordN/subscriptions","organizations_url":"https://api.github.com/users/fordN/orgs","repos_url":"https://api.github.com/users/fordN/repos","events_url":"https://api.github.com/users/fordN/events{/privacy}","received_events_url":"https://api.github.com/users/fordN/received_events","type":"User","site_admin":false},{"login":"timmclean","id":2249905,"node_id":"MDQ6VXNlcjIyNDk5MDU=","avatar_url":"https://avatars3.githubusercontent.com/u/2249905?v=4","gravatar_id":"","url":"https://api.github.com/users/timmclean","html_url":"https://github.com/timmclean","followers_url":"https://api.github.com/users/timmclean/followers","following_url":"https://api.github.com/users/timmclean/following{/other_user}","gists_url":"https://api.github.com/users/timmclean/gists{/gist_id}","starred_url":"https://api.github.com/users/timmclean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timmclean/subscriptions","organizations_url":"https://api.github.com/users/timmclean/orgs","repos_url":"https://api.github.com/users/timmclean/repos","events_url":"https://api.github.com/users/timmclean/events{/privacy}","received_events_url":"https://api.github.com/users/timmclean/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":915843397,"node_id":"MDU6TGFiZWw5MTU4NDMzOTc=","url":"https://api.github.com/repos/graphprotocol/graph-node/labels/pending%20review","name":"pending review","color":"ededed","default":false},{"id":933836988,"node_id":"MDU6TGFiZWw5MzM4MzY5ODg=","url":"https://api.github.com/repos/graphprotocol/graph-node/labels/review","name":"review","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/graphprotocol/graph-node/pulls/650/commits","review_comments_url":"https://api.github.com/repos/graphprotocol/graph-node/pulls/650/comments","review_comment_url":"https://api.github.com/repos/graphprotocol/graph-node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/graphprotocol/graph-node/issues/650/comments","statuses_url":"https://api.github.com/repos/graphprotocol/graph-node/statuses/bbe77c7b4cbf56cecce62131a6ea5a6e8f824d00","head":{"label":"graphprotocol:leo/store-connection-pooling","ref":"leo/store-connection-pooling","sha":"bbe77c7b4cbf56cecce62131a6ea5a6e8f824d00","user":{"login":"graphprotocol","id":38020273,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4MDIwMjcz","avatar_url":"https://avatars2.githubusercontent.com/u/38020273?v=4","gravatar_id":"","url":"https://api.github.com/users/graphprotocol","html_url":"https://github.com/graphprotocol","followers_url":"https://api.github.com/users/graphprotocol/followers","following_url":"https://api.github.com/users/graphprotocol/following{/other_user}","gists_url":"https://api.github.com/users/graphprotocol/gists{/gist_id}","starred_url":"https://api.github.com/users/graphprotocol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graphprotocol/subscriptions","organizations_url":"https://api.github.com/users/graphprotocol/orgs","repos_url":"https://api.github.com/users/graphprotocol/repos","events_url":"https://api.github.com/users/graphprotocol/events{/privacy}","received_events_url":"https://api.github.com/users/graphprotocol/received_events","type":"Organization","site_admin":false},"repo":{"id":130174051,"node_id":"MDEwOlJlcG9zaXRvcnkxMzAxNzQwNTE=","name":"graph-node","full_name":"graphprotocol/graph-node","private":false,"owner":{"login":"graphprotocol","id":38020273,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4MDIwMjcz","avatar_url":"https://avatars2.githubusercontent.com/u/38020273?v=4","gravatar_id":"","url":"https://api.github.com/users/graphprotocol","html_url":"https://github.com/graphprotocol","followers_url":"https://api.github.com/users/graphprotocol/followers","following_url":"https://api.github.com/users/graphprotocol/following{/other_user}","gists_url":"https://api.github.com/users/graphprotocol/gists{/gist_id}","starred_url":"https://api.github.com/users/graphprotocol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graphprotocol/subscriptions","organizations_url":"https://api.github.com/users/graphprotocol/orgs","repos_url":"https://api.github.com/users/graphprotocol/repos","events_url":"https://api.github.com/users/graphprotocol/events{/privacy}","received_events_url":"https://api.github.com/users/graphprotocol/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/graphprotocol/graph-node","description":"Graph Node indexes data from immutable datasources and serves it over GraphQL","fork":false,"url":"https://api.github.com/repos/graphprotocol/graph-node","forks_url":"https://api.github.com/repos/graphprotocol/graph-node/forks","keys_url":"https://api.github.com/repos/graphprotocol/graph-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/graphprotocol/graph-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/graphprotocol/graph-node/teams","hooks_url":"https://api.github.com/repos/graphprotocol/graph-node/hooks","issue_events_url":"https://api.github.com/repos/graphprotocol/graph-node/issues/events{/number}","events_url":"https://api.github.com/repos/graphprotocol/graph-node/events","assignees_url":"https://api.github.com/repos/graphprotocol/graph-node/assignees{/user}","branches_url":"https://api.github.com/repos/graphprotocol/graph-node/branches{/branch}","tags_url":"https://api.github.com/repos/graphprotocol/graph-node/tags","blobs_url":"https://api.github.com/repos/graphprotocol/graph-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/graphprotocol/graph-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/graphprotocol/graph-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/graphprotocol/graph-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/graphprotocol/graph-node/statuses/{sha}","languages_url":"https://api.github.com/repos/graphprotocol/graph-node/languages","stargazers_url":"https://api.github.com/repos/graphprotocol/graph-node/stargazers","contributors_url":"https://api.github.com/repos/graphprotocol/graph-node/contributors","subscribers_url":"https://api.github.com/repos/graphprotocol/graph-node/subscribers","subscription_url":"https://api.github.com/repos/graphprotocol/graph-node/subscription","commits_url":"https://api.github.com/repos/graphprotocol/graph-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/graphprotocol/graph-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/graphprotocol/graph-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/graphprotocol/graph-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/graphprotocol/graph-node/contents/{+path}","compare_url":"https://api.github.com/repos/graphprotocol/graph-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/graphprotocol/graph-node/merges","archive_url":"https://api.github.com/repos/graphprotocol/graph-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/graphprotocol/graph-node/downloads","issues_url":"https://api.github.com/repos/graphprotocol/graph-node/issues{/number}","pulls_url":"https://api.github.com/repos/graphprotocol/graph-node/pulls{/number}","milestones_url":"https://api.github.com/repos/graphprotocol/graph-node/milestones{/number}","notifications_url":"https://api.github.com/repos/graphprotocol/graph-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/graphprotocol/graph-node/labels{/name}","releases_url":"https://api.github.com/repos/graphprotocol/graph-node/releases{/id}","deployments_url":"https://api.github.com/repos/graphprotocol/graph-node/deployments","created_at":"2018-04-19T07:13:50Z","updated_at":"2018-12-18T22:08:00Z","pushed_at":"2018-12-18T23:17:46Z","git_url":"git://github.com/graphprotocol/graph-node.git","ssh_url":"git@github.com:graphprotocol/graph-node.git","clone_url":"https://github.com/graphprotocol/graph-node.git","svn_url":"https://github.com/graphprotocol/graph-node","homepage":"https://thegraph.com","size":6129,"stargazers_count":177,"watchers_count":177,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"archived":false,"open_issues_count":100,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":22,"open_issues":100,"watchers":177,"default_branch":"master"}},"base":{"label":"graphprotocol:master","ref":"master","sha":"e669da47c6b4e204cc316c68450dfccc52e09e79","user":{"login":"graphprotocol","id":38020273,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4MDIwMjcz","avatar_url":"https://avatars2.githubusercontent.com/u/38020273?v=4","gravatar_id":"","url":"https://api.github.com/users/graphprotocol","html_url":"https://github.com/graphprotocol","followers_url":"https://api.github.com/users/graphprotocol/followers","following_url":"https://api.github.com/users/graphprotocol/following{/other_user}","gists_url":"https://api.github.com/users/graphprotocol/gists{/gist_id}","starred_url":"https://api.github.com/users/graphprotocol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graphprotocol/subscriptions","organizations_url":"https://api.github.com/users/graphprotocol/orgs","repos_url":"https://api.github.com/users/graphprotocol/repos","events_url":"https://api.github.com/users/graphprotocol/events{/privacy}","received_events_url":"https://api.github.com/users/graphprotocol/received_events","type":"Organization","site_admin":false},"repo":{"id":130174051,"node_id":"MDEwOlJlcG9zaXRvcnkxMzAxNzQwNTE=","name":"graph-node","full_name":"graphprotocol/graph-node","private":false,"owner":{"login":"graphprotocol","id":38020273,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4MDIwMjcz","avatar_url":"https://avatars2.githubusercontent.com/u/38020273?v=4","gravatar_id":"","url":"https://api.github.com/users/graphprotocol","html_url":"https://github.com/graphprotocol","followers_url":"https://api.github.com/users/graphprotocol/followers","following_url":"https://api.github.com/users/graphprotocol/following{/other_user}","gists_url":"https://api.github.com/users/graphprotocol/gists{/gist_id}","starred_url":"https://api.github.com/users/graphprotocol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graphprotocol/subscriptions","organizations_url":"https://api.github.com/users/graphprotocol/orgs","repos_url":"https://api.github.com/users/graphprotocol/repos","events_url":"https://api.github.com/users/graphprotocol/events{/privacy}","received_events_url":"https://api.github.com/users/graphprotocol/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/graphprotocol/graph-node","description":"Graph Node indexes data from immutable datasources and serves it over GraphQL","fork":false,"url":"https://api.github.com/repos/graphprotocol/graph-node","forks_url":"https://api.github.com/repos/graphprotocol/graph-node/forks","keys_url":"https://api.github.com/repos/graphprotocol/graph-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/graphprotocol/graph-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/graphprotocol/graph-node/teams","hooks_url":"https://api.github.com/repos/graphprotocol/graph-node/hooks","issue_events_url":"https://api.github.com/repos/graphprotocol/graph-node/issues/events{/number}","events_url":"https://api.github.com/repos/graphprotocol/graph-node/events","assignees_url":"https://api.github.com/repos/graphprotocol/graph-node/assignees{/user}","branches_url":"https://api.github.com/repos/graphprotocol/graph-node/branches{/branch}","tags_url":"https://api.github.com/repos/graphprotocol/graph-node/tags","blobs_url":"https://api.github.com/repos/graphprotocol/graph-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/graphprotocol/graph-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/graphprotocol/graph-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/graphprotocol/graph-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/graphprotocol/graph-node/statuses/{sha}","languages_url":"https://api.github.com/repos/graphprotocol/graph-node/languages","stargazers_url":"https://api.github.com/repos/graphprotocol/graph-node/stargazers","contributors_url":"https://api.github.com/repos/graphprotocol/graph-node/contributors","subscribers_url":"https://api.github.com/repos/graphprotocol/graph-node/subscribers","subscription_url":"https://api.github.com/repos/graphprotocol/graph-node/subscription","commits_url":"https://api.github.com/repos/graphprotocol/graph-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/graphprotocol/graph-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/graphprotocol/graph-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/graphprotocol/graph-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/graphprotocol/graph-node/contents/{+path}","compare_url":"https://api.github.com/repos/graphprotocol/graph-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/graphprotocol/graph-node/merges","archive_url":"https://api.github.com/repos/graphprotocol/graph-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/graphprotocol/graph-node/downloads","issues_url":"https://api.github.com/repos/graphprotocol/graph-node/issues{/number}","pulls_url":"https://api.github.com/repos/graphprotocol/graph-node/pulls{/number}","milestones_url":"https://api.github.com/repos/graphprotocol/graph-node/milestones{/number}","notifications_url":"https://api.github.com/repos/graphprotocol/graph-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/graphprotocol/graph-node/labels{/name}","releases_url":"https://api.github.com/repos/graphprotocol/graph-node/releases{/id}","deployments_url":"https://api.github.com/repos/graphprotocol/graph-node/deployments","created_at":"2018-04-19T07:13:50Z","updated_at":"2018-12-18T22:08:00Z","pushed_at":"2018-12-18T23:17:46Z","git_url":"git://github.com/graphprotocol/graph-node.git","ssh_url":"git@github.com:graphprotocol/graph-node.git","clone_url":"https://github.com/graphprotocol/graph-node.git","svn_url":"https://github.com/graphprotocol/graph-node","homepage":"https://thegraph.com","size":6129,"stargazers_count":177,"watchers_count":177,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"archived":false,"open_issues_count":100,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":22,"open_issues":100,"watchers":177,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/graphprotocol/graph-node/pulls/650"},"html":{"href":"https://github.com/graphprotocol/graph-node/pull/650"},"issue":{"href":"https://api.github.com/repos/graphprotocol/graph-node/issues/650"},"comments":{"href":"https://api.github.com/repos/graphprotocol/graph-node/issues/650/comments"},"review_comments":{"href":"https://api.github.com/repos/graphprotocol/graph-node/pulls/650/comments"},"review_comment":{"href":"https://api.github.com/repos/graphprotocol/graph-node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/graphprotocol/graph-node/pulls/650/commits"},"statuses":{"href":"https://api.github.com/repos/graphprotocol/graph-node/statuses/bbe77c7b4cbf56cecce62131a6ea5a6e8f824d00"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Jannis"}}