{"action":"created","issue":{"url":"https://api.github.com/repos/curt-labs/API/issues/151","repository_url":"https://api.github.com/repos/curt-labs/API","labels_url":"https://api.github.com/repos/curt-labs/API/issues/151/labels{/name}","comments_url":"https://api.github.com/repos/curt-labs/API/issues/151/comments","events_url":"https://api.github.com/repos/curt-labs/API/issues/151/events","html_url":"https://github.com/curt-labs/API/pull/151","id":248835491,"number":151,"title":"Mysql Config Refactor","user":{"login":"awilsonCurt","id":25590753,"avatar_url":"https://avatars3.githubusercontent.com/u/25590753?v=4","gravatar_id":"","url":"https://api.github.com/users/awilsonCurt","html_url":"https://github.com/awilsonCurt","followers_url":"https://api.github.com/users/awilsonCurt/followers","following_url":"https://api.github.com/users/awilsonCurt/following{/other_user}","gists_url":"https://api.github.com/users/awilsonCurt/gists{/gist_id}","starred_url":"https://api.github.com/users/awilsonCurt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awilsonCurt/subscriptions","organizations_url":"https://api.github.com/users/awilsonCurt/orgs","repos_url":"https://api.github.com/users/awilsonCurt/repos","events_url":"https://api.github.com/users/awilsonCurt/events{/privacy}","received_events_url":"https://api.github.com/users/awilsonCurt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-08T20:24:33Z","updated_at":"2017-08-09T14:23:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/curt-labs/API/pulls/151","html_url":"https://github.com/curt-labs/API/pull/151","diff_url":"https://github.com/curt-labs/API/pull/151.diff","patch_url":"https://github.com/curt-labs/API/pull/151.patch"},"body":"This is a precursor to setting up CloudSQL proxy in GoAPI\r\n\r\nEssentially this looks like a lot of code, but what it is, is the same code a lot of times. I've simply switched all endpoints over to use the correct, singleton pattern of using the DB. Now instead of opening a new connection every single time, we just maintain one DB object that gets used whenever it's needed.\r\n\r\nI've done cursory testing over most endpoints in staging and everything is functioning as expected. The changes are pretty straightforward, there's just a lot of them.\r\n\r\nLehman also had some stuff in staging that isn't merged into the main branch unfortunately. In my opinion this branch should only be committed to prior to a merge into production so things like this don't happen. He's said that the code in those commits should be good for production but I don't know anything about them."},"comment":{"url":"https://api.github.com/repos/curt-labs/API/issues/comments/321270664","html_url":"https://github.com/curt-labs/API/pull/151#issuecomment-321270664","issue_url":"https://api.github.com/repos/curt-labs/API/issues/151","id":321270664,"user":{"login":"awilsonCurt","id":25590753,"avatar_url":"https://avatars3.githubusercontent.com/u/25590753?v=4","gravatar_id":"","url":"https://api.github.com/users/awilsonCurt","html_url":"https://github.com/awilsonCurt","followers_url":"https://api.github.com/users/awilsonCurt/followers","following_url":"https://api.github.com/users/awilsonCurt/following{/other_user}","gists_url":"https://api.github.com/users/awilsonCurt/gists{/gist_id}","starred_url":"https://api.github.com/users/awilsonCurt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awilsonCurt/subscriptions","organizations_url":"https://api.github.com/users/awilsonCurt/orgs","repos_url":"https://api.github.com/users/awilsonCurt/repos","events_url":"https://api.github.com/users/awilsonCurt/events{/privacy}","received_events_url":"https://api.github.com/users/awilsonCurt/received_events","type":"User","site_admin":false},"created_at":"2017-08-09T14:23:27Z","updated_at":"2017-08-09T14:23:27Z","body":"I took a look at the middleware.go file that David directed me to, and it seems like there is in fact a function that is called on every API call that opens a new connection to Mongo. I think this is what's causing the issue.\r\n\r\nLocated in models/cart/account.go, the function is AuthenticateAccount"}}
{"actor":{"display_login":"awilsonCurt"}}