{"action":"opened","number":205,"pull_request":{"url":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls/205","id":68394787,"html_url":"https://github.com/NYPL-Simplified/server_core/pull/205","diff_url":"https://github.com/NYPL-Simplified/server_core/pull/205.diff","patch_url":"https://github.com/NYPL-Simplified/server_core/pull/205.patch","issue_url":"https://api.github.com/repos/NYPL-Simplified/server_core/issues/205","number":205,"state":"open","locked":false,"title":"Stop storing session-specific information in global spaces","user":{"login":"leonardr","id":662474,"avatar_url":"https://avatars.githubusercontent.com/u/662474?v=3","gravatar_id":"","url":"https://api.github.com/users/leonardr","html_url":"https://github.com/leonardr","followers_url":"https://api.github.com/users/leonardr/followers","following_url":"https://api.github.com/users/leonardr/following{/other_user}","gists_url":"https://api.github.com/users/leonardr/gists{/gist_id}","starred_url":"https://api.github.com/users/leonardr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonardr/subscriptions","organizations_url":"https://api.github.com/users/leonardr/orgs","repos_url":"https://api.github.com/users/leonardr/repos","events_url":"https://api.github.com/users/leonardr/events{/privacy}","received_events_url":"https://api.github.com/users/leonardr/received_events","type":"User","site_admin":false},"body":"This branch makes two changes in preparation for giving each incoming request to an app server its own database session (allowing multithreaded use).\r\n\r\n1. It stops pre-caching DataSource, Genre, and LicensepoolDeliveryMechanism objects globally. These objects are associated with a specific database session, which works as long as the entire app is running against the same session, but falls apart as soon as session #2 tries to use an object created by session #1.\r\n\r\nI don't know what the performance implications of this will be, but I really don't see any way around this, and we've seen that sharing a single database session has terrible implications for scalability.\r\n\r\n2. It refactors the process of setting up database sessions and rolling them back to use the standard `unittest` setup/teardown mechanisms, rather than the old (very hacky) mechanism that I made because I didn't know what I was doing.","created_at":"2016-04-29T16:03:36Z","updated_at":"2016-04-29T16:03:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls/205/commits","review_comments_url":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls/205/comments","review_comment_url":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NYPL-Simplified/server_core/issues/205/comments","statuses_url":"https://api.github.com/repos/NYPL-Simplified/server_core/statuses/0f28d542875d2893708a048f8ba2138108b43dc2","head":{"label":"NYPL-Simplified:scoped-session","ref":"scoped-session","sha":"0f28d542875d2893708a048f8ba2138108b43dc2","user":{"login":"NYPL-Simplified","id":16416905,"avatar_url":"https://avatars.githubusercontent.com/u/16416905?v=3","gravatar_id":"","url":"https://api.github.com/users/NYPL-Simplified","html_url":"https://github.com/NYPL-Simplified","followers_url":"https://api.github.com/users/NYPL-Simplified/followers","following_url":"https://api.github.com/users/NYPL-Simplified/following{/other_user}","gists_url":"https://api.github.com/users/NYPL-Simplified/gists{/gist_id}","starred_url":"https://api.github.com/users/NYPL-Simplified/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYPL-Simplified/subscriptions","organizations_url":"https://api.github.com/users/NYPL-Simplified/orgs","repos_url":"https://api.github.com/users/NYPL-Simplified/repos","events_url":"https://api.github.com/users/NYPL-Simplified/events{/privacy}","received_events_url":"https://api.github.com/users/NYPL-Simplified/received_events","type":"Organization","site_admin":false},"repo":{"id":27601287,"name":"server_core","full_name":"NYPL-Simplified/server_core","owner":{"login":"NYPL-Simplified","id":16416905,"avatar_url":"https://avatars.githubusercontent.com/u/16416905?v=3","gravatar_id":"","url":"https://api.github.com/users/NYPL-Simplified","html_url":"https://github.com/NYPL-Simplified","followers_url":"https://api.github.com/users/NYPL-Simplified/followers","following_url":"https://api.github.com/users/NYPL-Simplified/following{/other_user}","gists_url":"https://api.github.com/users/NYPL-Simplified/gists{/gist_id}","starred_url":"https://api.github.com/users/NYPL-Simplified/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYPL-Simplified/subscriptions","organizations_url":"https://api.github.com/users/NYPL-Simplified/orgs","repos_url":"https://api.github.com/users/NYPL-Simplified/repos","events_url":"https://api.github.com/users/NYPL-Simplified/events{/privacy}","received_events_url":"https://api.github.com/users/NYPL-Simplified/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NYPL-Simplified/server_core","description":"Shared data model and utilities for Library Simplified server applications","fork":false,"url":"https://api.github.com/repos/NYPL-Simplified/server_core","forks_url":"https://api.github.com/repos/NYPL-Simplified/server_core/forks","keys_url":"https://api.github.com/repos/NYPL-Simplified/server_core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NYPL-Simplified/server_core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NYPL-Simplified/server_core/teams","hooks_url":"https://api.github.com/repos/NYPL-Simplified/server_core/hooks","issue_events_url":"https://api.github.com/repos/NYPL-Simplified/server_core/issues/events{/number}","events_url":"https://api.github.com/repos/NYPL-Simplified/server_core/events","assignees_url":"https://api.github.com/repos/NYPL-Simplified/server_core/assignees{/user}","branches_url":"https://api.github.com/repos/NYPL-Simplified/server_core/branches{/branch}","tags_url":"https://api.github.com/repos/NYPL-Simplified/server_core/tags","blobs_url":"https://api.github.com/repos/NYPL-Simplified/server_core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NYPL-Simplified/server_core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NYPL-Simplified/server_core/git/refs{/sha}","trees_url":"https://api.github.com/repos/NYPL-Simplified/server_core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NYPL-Simplified/server_core/statuses/{sha}","languages_url":"https://api.github.com/repos/NYPL-Simplified/server_core/languages","stargazers_url":"https://api.github.com/repos/NYPL-Simplified/server_core/stargazers","contributors_url":"https://api.github.com/repos/NYPL-Simplified/server_core/contributors","subscribers_url":"https://api.github.com/repos/NYPL-Simplified/server_core/subscribers","subscription_url":"https://api.github.com/repos/NYPL-Simplified/server_core/subscription","commits_url":"https://api.github.com/repos/NYPL-Simplified/server_core/commits{/sha}","git_commits_url":"https://api.github.com/repos/NYPL-Simplified/server_core/git/commits{/sha}","comments_url":"https://api.github.com/repos/NYPL-Simplified/server_core/comments{/number}","issue_comment_url":"https://api.github.com/repos/NYPL-Simplified/server_core/issues/comments{/number}","contents_url":"https://api.github.com/repos/NYPL-Simplified/server_core/contents/{+path}","compare_url":"https://api.github.com/repos/NYPL-Simplified/server_core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NYPL-Simplified/server_core/merges","archive_url":"https://api.github.com/repos/NYPL-Simplified/server_core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NYPL-Simplified/server_core/downloads","issues_url":"https://api.github.com/repos/NYPL-Simplified/server_core/issues{/number}","pulls_url":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls{/number}","milestones_url":"https://api.github.com/repos/NYPL-Simplified/server_core/milestones{/number}","notifications_url":"https://api.github.com/repos/NYPL-Simplified/server_core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NYPL-Simplified/server_core/labels{/name}","releases_url":"https://api.github.com/repos/NYPL-Simplified/server_core/releases{/id}","deployments_url":"https://api.github.com/repos/NYPL-Simplified/server_core/deployments","created_at":"2014-12-05T17:03:04Z","updated_at":"2016-01-25T15:38:10Z","pushed_at":"2016-04-29T16:03:36Z","git_url":"git://github.com/NYPL-Simplified/server_core.git","ssh_url":"git@github.com:NYPL-Simplified/server_core.git","clone_url":"https://github.com/NYPL-Simplified/server_core.git","svn_url":"https://github.com/NYPL-Simplified/server_core","homepage":null,"size":3271,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":25,"forks":0,"open_issues":25,"watchers":0,"default_branch":"master"}},"base":{"label":"NYPL-Simplified:master","ref":"master","sha":"fb68a2b42fdb45559190473ef42b365c4f3d4ffc","user":{"login":"NYPL-Simplified","id":16416905,"avatar_url":"https://avatars.githubusercontent.com/u/16416905?v=3","gravatar_id":"","url":"https://api.github.com/users/NYPL-Simplified","html_url":"https://github.com/NYPL-Simplified","followers_url":"https://api.github.com/users/NYPL-Simplified/followers","following_url":"https://api.github.com/users/NYPL-Simplified/following{/other_user}","gists_url":"https://api.github.com/users/NYPL-Simplified/gists{/gist_id}","starred_url":"https://api.github.com/users/NYPL-Simplified/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYPL-Simplified/subscriptions","organizations_url":"https://api.github.com/users/NYPL-Simplified/orgs","repos_url":"https://api.github.com/users/NYPL-Simplified/repos","events_url":"https://api.github.com/users/NYPL-Simplified/events{/privacy}","received_events_url":"https://api.github.com/users/NYPL-Simplified/received_events","type":"Organization","site_admin":false},"repo":{"id":27601287,"name":"server_core","full_name":"NYPL-Simplified/server_core","owner":{"login":"NYPL-Simplified","id":16416905,"avatar_url":"https://avatars.githubusercontent.com/u/16416905?v=3","gravatar_id":"","url":"https://api.github.com/users/NYPL-Simplified","html_url":"https://github.com/NYPL-Simplified","followers_url":"https://api.github.com/users/NYPL-Simplified/followers","following_url":"https://api.github.com/users/NYPL-Simplified/following{/other_user}","gists_url":"https://api.github.com/users/NYPL-Simplified/gists{/gist_id}","starred_url":"https://api.github.com/users/NYPL-Simplified/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYPL-Simplified/subscriptions","organizations_url":"https://api.github.com/users/NYPL-Simplified/orgs","repos_url":"https://api.github.com/users/NYPL-Simplified/repos","events_url":"https://api.github.com/users/NYPL-Simplified/events{/privacy}","received_events_url":"https://api.github.com/users/NYPL-Simplified/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NYPL-Simplified/server_core","description":"Shared data model and utilities for Library Simplified server applications","fork":false,"url":"https://api.github.com/repos/NYPL-Simplified/server_core","forks_url":"https://api.github.com/repos/NYPL-Simplified/server_core/forks","keys_url":"https://api.github.com/repos/NYPL-Simplified/server_core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NYPL-Simplified/server_core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NYPL-Simplified/server_core/teams","hooks_url":"https://api.github.com/repos/NYPL-Simplified/server_core/hooks","issue_events_url":"https://api.github.com/repos/NYPL-Simplified/server_core/issues/events{/number}","events_url":"https://api.github.com/repos/NYPL-Simplified/server_core/events","assignees_url":"https://api.github.com/repos/NYPL-Simplified/server_core/assignees{/user}","branches_url":"https://api.github.com/repos/NYPL-Simplified/server_core/branches{/branch}","tags_url":"https://api.github.com/repos/NYPL-Simplified/server_core/tags","blobs_url":"https://api.github.com/repos/NYPL-Simplified/server_core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NYPL-Simplified/server_core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NYPL-Simplified/server_core/git/refs{/sha}","trees_url":"https://api.github.com/repos/NYPL-Simplified/server_core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NYPL-Simplified/server_core/statuses/{sha}","languages_url":"https://api.github.com/repos/NYPL-Simplified/server_core/languages","stargazers_url":"https://api.github.com/repos/NYPL-Simplified/server_core/stargazers","contributors_url":"https://api.github.com/repos/NYPL-Simplified/server_core/contributors","subscribers_url":"https://api.github.com/repos/NYPL-Simplified/server_core/subscribers","subscription_url":"https://api.github.com/repos/NYPL-Simplified/server_core/subscription","commits_url":"https://api.github.com/repos/NYPL-Simplified/server_core/commits{/sha}","git_commits_url":"https://api.github.com/repos/NYPL-Simplified/server_core/git/commits{/sha}","comments_url":"https://api.github.com/repos/NYPL-Simplified/server_core/comments{/number}","issue_comment_url":"https://api.github.com/repos/NYPL-Simplified/server_core/issues/comments{/number}","contents_url":"https://api.github.com/repos/NYPL-Simplified/server_core/contents/{+path}","compare_url":"https://api.github.com/repos/NYPL-Simplified/server_core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NYPL-Simplified/server_core/merges","archive_url":"https://api.github.com/repos/NYPL-Simplified/server_core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NYPL-Simplified/server_core/downloads","issues_url":"https://api.github.com/repos/NYPL-Simplified/server_core/issues{/number}","pulls_url":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls{/number}","milestones_url":"https://api.github.com/repos/NYPL-Simplified/server_core/milestones{/number}","notifications_url":"https://api.github.com/repos/NYPL-Simplified/server_core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NYPL-Simplified/server_core/labels{/name}","releases_url":"https://api.github.com/repos/NYPL-Simplified/server_core/releases{/id}","deployments_url":"https://api.github.com/repos/NYPL-Simplified/server_core/deployments","created_at":"2014-12-05T17:03:04Z","updated_at":"2016-01-25T15:38:10Z","pushed_at":"2016-04-29T16:03:36Z","git_url":"git://github.com/NYPL-Simplified/server_core.git","ssh_url":"git@github.com:NYPL-Simplified/server_core.git","clone_url":"https://github.com/NYPL-Simplified/server_core.git","svn_url":"https://github.com/NYPL-Simplified/server_core","homepage":null,"size":3271,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":25,"forks":0,"open_issues":25,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls/205"},"html":{"href":"https://github.com/NYPL-Simplified/server_core/pull/205"},"issue":{"href":"https://api.github.com/repos/NYPL-Simplified/server_core/issues/205"},"comments":{"href":"https://api.github.com/repos/NYPL-Simplified/server_core/issues/205/comments"},"review_comments":{"href":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls/205/comments"},"review_comment":{"href":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NYPL-Simplified/server_core/pulls/205/commits"},"statuses":{"href":"https://api.github.com/repos/NYPL-Simplified/server_core/statuses/0f28d542875d2893708a048f8ba2138108b43dc2"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":10,"additions":112,"deletions":149,"changed_files":5}}