{"action":"created","comment":{"url":"https://api.github.com/repos/getlarky/nudge-peen/pulls/comments/174254123","pull_request_review_id":103564383,"id":174254123,"diff_hunk":"@@ -0,0 +1,54 @@\n+const mysql = require('mysql')\n+const async = require('async')\n+const config = require('../common').config()\n+\n+const PRODUCTION_DB = 'app_prod_database'\n+const TEST_DB = 'app_test_database'\n+\n+exports.TEST_MODE = 'test_mode'\n+exports.PRODUCTION_MODE = 'production_mode'\n+\n+let state = {\n+  pool: null,\n+  mode: null,\n+}\n+\n+exports.connect = function(mode, done) {\n+  state.pool = mysql.createPool({","path":"peen/db/db.js","position":17,"original_position":17,"commit_id":"eb972f27a704cee0844d03e8abc9f432f4fb58ed","original_commit_id":"53a2f3c17746a6ecac223034a5d62c876058047a","user":{"login":"McGarveyMobile","id":3892697,"avatar_url":"https://avatars2.githubusercontent.com/u/3892697?v=4","gravatar_id":"","url":"https://api.github.com/users/McGarveyMobile","html_url":"https://github.com/McGarveyMobile","followers_url":"https://api.github.com/users/McGarveyMobile/followers","following_url":"https://api.github.com/users/McGarveyMobile/following{/other_user}","gists_url":"https://api.github.com/users/McGarveyMobile/gists{/gist_id}","starred_url":"https://api.github.com/users/McGarveyMobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/McGarveyMobile/subscriptions","organizations_url":"https://api.github.com/users/McGarveyMobile/orgs","repos_url":"https://api.github.com/users/McGarveyMobile/repos","events_url":"https://api.github.com/users/McGarveyMobile/events{/privacy}","received_events_url":"https://api.github.com/users/McGarveyMobile/received_events","type":"User","site_admin":false},"body":"I think you should set a `connectionLimit` here so we can better control our resources","created_at":"2018-03-13T19:20:11Z","updated_at":"2018-03-13T19:55:49Z","html_url":"https://github.com/getlarky/nudge-peen/pull/1#discussion_r174254123","pull_request_url":"https://api.github.com/repos/getlarky/nudge-peen/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/getlarky/nudge-peen/pulls/comments/174254123"},"html":{"href":"https://github.com/getlarky/nudge-peen/pull/1#discussion_r174254123"},"pull_request":{"href":"https://api.github.com/repos/getlarky/nudge-peen/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/getlarky/nudge-peen/pulls/1","id":166681513,"html_url":"https://github.com/getlarky/nudge-peen/pull/1","diff_url":"https://github.com/getlarky/nudge-peen/pull/1.diff","patch_url":"https://github.com/getlarky/nudge-peen/pull/1.patch","issue_url":"https://api.github.com/repos/getlarky/nudge-peen/issues/1","number":1,"state":"open","locked":false,"title":"[CR ONLY] nudge PEEN token registration #26","user":{"login":"bromeostasis","id":3764641,"avatar_url":"https://avatars3.githubusercontent.com/u/3764641?v=4","gravatar_id":"","url":"https://api.github.com/users/bromeostasis","html_url":"https://github.com/bromeostasis","followers_url":"https://api.github.com/users/bromeostasis/followers","following_url":"https://api.github.com/users/bromeostasis/following{/other_user}","gists_url":"https://api.github.com/users/bromeostasis/gists{/gist_id}","starred_url":"https://api.github.com/users/bromeostasis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bromeostasis/subscriptions","organizations_url":"https://api.github.com/users/bromeostasis/orgs","repos_url":"https://api.github.com/users/bromeostasis/repos","events_url":"https://api.github.com/users/bromeostasis/events{/privacy}","received_events_url":"https://api.github.com/users/bromeostasis/received_events","type":"User","site_admin":false},"body":"Closes getlarky/nudge#26\r\n\r\nTesting started [here](https://github.com/getlarky/nudge/issues/26#issuecomment-362323144), completed [here](https://github.com/getlarky/nudge/issues/26#issuecomment-363138390) ~~still to be completed by @McGarveyMobile~~","created_at":"2018-02-01T23:33:47Z","updated_at":"2018-03-13T19:55:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c2ba702d78ac8f8b59ba6797456898b3bc5e58ec","assignee":{"login":"bromeostasis","id":3764641,"avatar_url":"https://avatars3.githubusercontent.com/u/3764641?v=4","gravatar_id":"","url":"https://api.github.com/users/bromeostasis","html_url":"https://github.com/bromeostasis","followers_url":"https://api.github.com/users/bromeostasis/followers","following_url":"https://api.github.com/users/bromeostasis/following{/other_user}","gists_url":"https://api.github.com/users/bromeostasis/gists{/gist_id}","starred_url":"https://api.github.com/users/bromeostasis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bromeostasis/subscriptions","organizations_url":"https://api.github.com/users/bromeostasis/orgs","repos_url":"https://api.github.com/users/bromeostasis/repos","events_url":"https://api.github.com/users/bromeostasis/events{/privacy}","received_events_url":"https://api.github.com/users/bromeostasis/received_events","type":"User","site_admin":false},"assignees":[{"login":"bromeostasis","id":3764641,"avatar_url":"https://avatars3.githubusercontent.com/u/3764641?v=4","gravatar_id":"","url":"https://api.github.com/users/bromeostasis","html_url":"https://github.com/bromeostasis","followers_url":"https://api.github.com/users/bromeostasis/followers","following_url":"https://api.github.com/users/bromeostasis/following{/other_user}","gists_url":"https://api.github.com/users/bromeostasis/gists{/gist_id}","starred_url":"https://api.github.com/users/bromeostasis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bromeostasis/subscriptions","organizations_url":"https://api.github.com/users/bromeostasis/orgs","repos_url":"https://api.github.com/users/bromeostasis/repos","events_url":"https://api.github.com/users/bromeostasis/events{/privacy}","received_events_url":"https://api.github.com/users/bromeostasis/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/getlarky/nudge-peen/pulls/1/commits","review_comments_url":"https://api.github.com/repos/getlarky/nudge-peen/pulls/1/comments","review_comment_url":"https://api.github.com/repos/getlarky/nudge-peen/pulls/comments{/number}","comments_url":"https://api.github.com/repos/getlarky/nudge-peen/issues/1/comments","statuses_url":"https://api.github.com/repos/getlarky/nudge-peen/statuses/eb972f27a704cee0844d03e8abc9f432f4fb58ed","head":{"label":"getlarky:master","ref":"master","sha":"eb972f27a704cee0844d03e8abc9f432f4fb58ed","user":{"login":"getlarky","id":8038497,"avatar_url":"https://avatars1.githubusercontent.com/u/8038497?v=4","gravatar_id":"","url":"https://api.github.com/users/getlarky","html_url":"https://github.com/getlarky","followers_url":"https://api.github.com/users/getlarky/followers","following_url":"https://api.github.com/users/getlarky/following{/other_user}","gists_url":"https://api.github.com/users/getlarky/gists{/gist_id}","starred_url":"https://api.github.com/users/getlarky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getlarky/subscriptions","organizations_url":"https://api.github.com/users/getlarky/orgs","repos_url":"https://api.github.com/users/getlarky/repos","events_url":"https://api.github.com/users/getlarky/events{/privacy}","received_events_url":"https://api.github.com/users/getlarky/received_events","type":"Organization","site_admin":false},"repo":{"id":118965652,"name":"nudge-peen","full_name":"getlarky/nudge-peen","owner":{"login":"getlarky","id":8038497,"avatar_url":"https://avatars1.githubusercontent.com/u/8038497?v=4","gravatar_id":"","url":"https://api.github.com/users/getlarky","html_url":"https://github.com/getlarky","followers_url":"https://api.github.com/users/getlarky/followers","following_url":"https://api.github.com/users/getlarky/following{/other_user}","gists_url":"https://api.github.com/users/getlarky/gists{/gist_id}","starred_url":"https://api.github.com/users/getlarky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getlarky/subscriptions","organizations_url":"https://api.github.com/users/getlarky/orgs","repos_url":"https://api.github.com/users/getlarky/repos","events_url":"https://api.github.com/users/getlarky/events{/privacy}","received_events_url":"https://api.github.com/users/getlarky/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/getlarky/nudge-peen","description":"PEEN microservice for nudge!","fork":false,"url":"https://api.github.com/repos/getlarky/nudge-peen","forks_url":"https://api.github.com/repos/getlarky/nudge-peen/forks","keys_url":"https://api.github.com/repos/getlarky/nudge-peen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getlarky/nudge-peen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getlarky/nudge-peen/teams","hooks_url":"https://api.github.com/repos/getlarky/nudge-peen/hooks","issue_events_url":"https://api.github.com/repos/getlarky/nudge-peen/issues/events{/number}","events_url":"https://api.github.com/repos/getlarky/nudge-peen/events","assignees_url":"https://api.github.com/repos/getlarky/nudge-peen/assignees{/user}","branches_url":"https://api.github.com/repos/getlarky/nudge-peen/branches{/branch}","tags_url":"https://api.github.com/repos/getlarky/nudge-peen/tags","blobs_url":"https://api.github.com/repos/getlarky/nudge-peen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getlarky/nudge-peen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getlarky/nudge-peen/git/refs{/sha}","trees_url":"https://api.github.com/repos/getlarky/nudge-peen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getlarky/nudge-peen/statuses/{sha}","languages_url":"https://api.github.com/repos/getlarky/nudge-peen/languages","stargazers_url":"https://api.github.com/repos/getlarky/nudge-peen/stargazers","contributors_url":"https://api.github.com/repos/getlarky/nudge-peen/contributors","subscribers_url":"https://api.github.com/repos/getlarky/nudge-peen/subscribers","subscription_url":"https://api.github.com/repos/getlarky/nudge-peen/subscription","commits_url":"https://api.github.com/repos/getlarky/nudge-peen/commits{/sha}","git_commits_url":"https://api.github.com/repos/getlarky/nudge-peen/git/commits{/sha}","comments_url":"https://api.github.com/repos/getlarky/nudge-peen/comments{/number}","issue_comment_url":"https://api.github.com/repos/getlarky/nudge-peen/issues/comments{/number}","contents_url":"https://api.github.com/repos/getlarky/nudge-peen/contents/{+path}","compare_url":"https://api.github.com/repos/getlarky/nudge-peen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getlarky/nudge-peen/merges","archive_url":"https://api.github.com/repos/getlarky/nudge-peen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getlarky/nudge-peen/downloads","issues_url":"https://api.github.com/repos/getlarky/nudge-peen/issues{/number}","pulls_url":"https://api.github.com/repos/getlarky/nudge-peen/pulls{/number}","milestones_url":"https://api.github.com/repos/getlarky/nudge-peen/milestones{/number}","notifications_url":"https://api.github.com/repos/getlarky/nudge-peen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getlarky/nudge-peen/labels{/name}","releases_url":"https://api.github.com/repos/getlarky/nudge-peen/releases{/id}","deployments_url":"https://api.github.com/repos/getlarky/nudge-peen/deployments","created_at":"2018-01-25T20:44:19Z","updated_at":"2018-03-13T19:53:42Z","pushed_at":"2018-03-13T19:53:42Z","git_url":"git://github.com/getlarky/nudge-peen.git","ssh_url":"git@github.com:getlarky/nudge-peen.git","clone_url":"https://github.com/getlarky/nudge-peen.git","svn_url":"https://github.com/getlarky/nudge-peen","homepage":null,"size":197,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"getlarky:initial-commit","ref":"initial-commit","sha":"0f10202befa8f441710c23cc03bffe3a222889a2","user":{"login":"getlarky","id":8038497,"avatar_url":"https://avatars1.githubusercontent.com/u/8038497?v=4","gravatar_id":"","url":"https://api.github.com/users/getlarky","html_url":"https://github.com/getlarky","followers_url":"https://api.github.com/users/getlarky/followers","following_url":"https://api.github.com/users/getlarky/following{/other_user}","gists_url":"https://api.github.com/users/getlarky/gists{/gist_id}","starred_url":"https://api.github.com/users/getlarky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getlarky/subscriptions","organizations_url":"https://api.github.com/users/getlarky/orgs","repos_url":"https://api.github.com/users/getlarky/repos","events_url":"https://api.github.com/users/getlarky/events{/privacy}","received_events_url":"https://api.github.com/users/getlarky/received_events","type":"Organization","site_admin":false},"repo":{"id":118965652,"name":"nudge-peen","full_name":"getlarky/nudge-peen","owner":{"login":"getlarky","id":8038497,"avatar_url":"https://avatars1.githubusercontent.com/u/8038497?v=4","gravatar_id":"","url":"https://api.github.com/users/getlarky","html_url":"https://github.com/getlarky","followers_url":"https://api.github.com/users/getlarky/followers","following_url":"https://api.github.com/users/getlarky/following{/other_user}","gists_url":"https://api.github.com/users/getlarky/gists{/gist_id}","starred_url":"https://api.github.com/users/getlarky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getlarky/subscriptions","organizations_url":"https://api.github.com/users/getlarky/orgs","repos_url":"https://api.github.com/users/getlarky/repos","events_url":"https://api.github.com/users/getlarky/events{/privacy}","received_events_url":"https://api.github.com/users/getlarky/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/getlarky/nudge-peen","description":"PEEN microservice for nudge!","fork":false,"url":"https://api.github.com/repos/getlarky/nudge-peen","forks_url":"https://api.github.com/repos/getlarky/nudge-peen/forks","keys_url":"https://api.github.com/repos/getlarky/nudge-peen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getlarky/nudge-peen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getlarky/nudge-peen/teams","hooks_url":"https://api.github.com/repos/getlarky/nudge-peen/hooks","issue_events_url":"https://api.github.com/repos/getlarky/nudge-peen/issues/events{/number}","events_url":"https://api.github.com/repos/getlarky/nudge-peen/events","assignees_url":"https://api.github.com/repos/getlarky/nudge-peen/assignees{/user}","branches_url":"https://api.github.com/repos/getlarky/nudge-peen/branches{/branch}","tags_url":"https://api.github.com/repos/getlarky/nudge-peen/tags","blobs_url":"https://api.github.com/repos/getlarky/nudge-peen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getlarky/nudge-peen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getlarky/nudge-peen/git/refs{/sha}","trees_url":"https://api.github.com/repos/getlarky/nudge-peen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getlarky/nudge-peen/statuses/{sha}","languages_url":"https://api.github.com/repos/getlarky/nudge-peen/languages","stargazers_url":"https://api.github.com/repos/getlarky/nudge-peen/stargazers","contributors_url":"https://api.github.com/repos/getlarky/nudge-peen/contributors","subscribers_url":"https://api.github.com/repos/getlarky/nudge-peen/subscribers","subscription_url":"https://api.github.com/repos/getlarky/nudge-peen/subscription","commits_url":"https://api.github.com/repos/getlarky/nudge-peen/commits{/sha}","git_commits_url":"https://api.github.com/repos/getlarky/nudge-peen/git/commits{/sha}","comments_url":"https://api.github.com/repos/getlarky/nudge-peen/comments{/number}","issue_comment_url":"https://api.github.com/repos/getlarky/nudge-peen/issues/comments{/number}","contents_url":"https://api.github.com/repos/getlarky/nudge-peen/contents/{+path}","compare_url":"https://api.github.com/repos/getlarky/nudge-peen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getlarky/nudge-peen/merges","archive_url":"https://api.github.com/repos/getlarky/nudge-peen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getlarky/nudge-peen/downloads","issues_url":"https://api.github.com/repos/getlarky/nudge-peen/issues{/number}","pulls_url":"https://api.github.com/repos/getlarky/nudge-peen/pulls{/number}","milestones_url":"https://api.github.com/repos/getlarky/nudge-peen/milestones{/number}","notifications_url":"https://api.github.com/repos/getlarky/nudge-peen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getlarky/nudge-peen/labels{/name}","releases_url":"https://api.github.com/repos/getlarky/nudge-peen/releases{/id}","deployments_url":"https://api.github.com/repos/getlarky/nudge-peen/deployments","created_at":"2018-01-25T20:44:19Z","updated_at":"2018-03-13T19:53:42Z","pushed_at":"2018-03-13T19:53:42Z","git_url":"git://github.com/getlarky/nudge-peen.git","ssh_url":"git@github.com:getlarky/nudge-peen.git","clone_url":"https://github.com/getlarky/nudge-peen.git","svn_url":"https://github.com/getlarky/nudge-peen","homepage":null,"size":197,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/getlarky/nudge-peen/pulls/1"},"html":{"href":"https://github.com/getlarky/nudge-peen/pull/1"},"issue":{"href":"https://api.github.com/repos/getlarky/nudge-peen/issues/1"},"comments":{"href":"https://api.github.com/repos/getlarky/nudge-peen/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/getlarky/nudge-peen/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/getlarky/nudge-peen/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/getlarky/nudge-peen/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/getlarky/nudge-peen/statuses/eb972f27a704cee0844d03e8abc9f432f4fb58ed"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"McGarveyMobile"}}