{"action":"created","comment":{"url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/pulls/comments/66544260","id":66544260,"diff_hunk":"@@ -0,0 +1,36 @@\n+require 'noid'\n+\n+module ActiveFedora\n+  module Noid\n+    module Minter\n+      class Db < Base\n+\n+        protected\n+\n+        # Uses pessimistic lock to ensure the record fetched is the same one updated.\n+        # Should be fast enough to avoid terrible deadlock.\n+        # Must lock because of multi-connection context! (transaction is per connection -- not enough)\n+        def next_id\n+          id = ''\n+          MinterState.with_lock do\n+            state = MinterState.first || do","path":"lib/active_fedora/noid/minter/db.rb","position":16,"original_position":16,"commit_id":"a0975d1f7c47f18495c21df145e3c724c20ef925","original_commit_id":"d4c0430430ae615c6f4a9c0fd1c54519a518b500","user":{"login":"jcoyne","id":92044,"avatar_url":"https://avatars.githubusercontent.com/u/92044?v=3","gravatar_id":"","url":"https://api.github.com/users/jcoyne","html_url":"https://github.com/jcoyne","followers_url":"https://api.github.com/users/jcoyne/followers","following_url":"https://api.github.com/users/jcoyne/following{/other_user}","gists_url":"https://api.github.com/users/jcoyne/gists{/gist_id}","starred_url":"https://api.github.com/users/jcoyne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcoyne/subscriptions","organizations_url":"https://api.github.com/users/jcoyne/orgs","repos_url":"https://api.github.com/users/jcoyne/repos","events_url":"https://api.github.com/users/jcoyne/events{/privacy}","received_events_url":"https://api.github.com/users/jcoyne/received_events","type":"User","site_admin":false},"body":"You can make the method private","created_at":"2016-06-10T00:17:06Z","updated_at":"2016-06-10T00:17:06Z","html_url":"https://github.com/projecthydra-labs/active_fedora-noid/pull/25#discussion_r66544260","pull_request_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/pulls/comments/66544260"},"html":{"href":"https://github.com/projecthydra-labs/active_fedora-noid/pull/25#discussion_r66544260"},"pull_request":{"href":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/pulls/25","id":73268986,"html_url":"https://github.com/projecthydra-labs/active_fedora-noid/pull/25","diff_url":"https://github.com/projecthydra-labs/active_fedora-noid/pull/25.diff","patch_url":"https://github.com/projecthydra-labs/active_fedora-noid/pull/25.patch","issue_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/issues/25","number":25,"state":"open","locked":false,"title":"[WIP] database backed minter","user":{"login":"atz","id":109954,"avatar_url":"https://avatars.githubusercontent.com/u/109954?v=3","gravatar_id":"","url":"https://api.github.com/users/atz","html_url":"https://github.com/atz","followers_url":"https://api.github.com/users/atz/followers","following_url":"https://api.github.com/users/atz/following{/other_user}","gists_url":"https://api.github.com/users/atz/gists{/gist_id}","starred_url":"https://api.github.com/users/atz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atz/subscriptions","organizations_url":"https://api.github.com/users/atz/orgs","repos_url":"https://api.github.com/users/atz/repos","events_url":"https://api.github.com/users/atz/events{/privacy}","received_events_url":"https://api.github.com/users/atz/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-09T19:10:11Z","updated_at":"2016-06-10T00:17:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"20a94ed4a42671ae8fa65c0b1aed712f4883e5a1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/pulls/25/commits","review_comments_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/pulls/25/comments","review_comment_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/issues/25/comments","statuses_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/statuses/a0975d1f7c47f18495c21df145e3c724c20ef925","head":{"label":"projecthydra-labs:db","ref":"db","sha":"a0975d1f7c47f18495c21df145e3c724c20ef925","user":{"login":"projecthydra-labs","id":7377013,"avatar_url":"https://avatars.githubusercontent.com/u/7377013?v=3","gravatar_id":"","url":"https://api.github.com/users/projecthydra-labs","html_url":"https://github.com/projecthydra-labs","followers_url":"https://api.github.com/users/projecthydra-labs/followers","following_url":"https://api.github.com/users/projecthydra-labs/following{/other_user}","gists_url":"https://api.github.com/users/projecthydra-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/projecthydra-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecthydra-labs/subscriptions","organizations_url":"https://api.github.com/users/projecthydra-labs/orgs","repos_url":"https://api.github.com/users/projecthydra-labs/repos","events_url":"https://api.github.com/users/projecthydra-labs/events{/privacy}","received_events_url":"https://api.github.com/users/projecthydra-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":33135190,"name":"active_fedora-noid","full_name":"projecthydra-labs/active_fedora-noid","owner":{"login":"projecthydra-labs","id":7377013,"avatar_url":"https://avatars.githubusercontent.com/u/7377013?v=3","gravatar_id":"","url":"https://api.github.com/users/projecthydra-labs","html_url":"https://github.com/projecthydra-labs","followers_url":"https://api.github.com/users/projecthydra-labs/followers","following_url":"https://api.github.com/users/projecthydra-labs/following{/other_user}","gists_url":"https://api.github.com/users/projecthydra-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/projecthydra-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecthydra-labs/subscriptions","organizations_url":"https://api.github.com/users/projecthydra-labs/orgs","repos_url":"https://api.github.com/users/projecthydra-labs/repos","events_url":"https://api.github.com/users/projecthydra-labs/events{/privacy}","received_events_url":"https://api.github.com/users/projecthydra-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projecthydra-labs/active_fedora-noid","description":"Noid identifier services for ActiveFedora-based applications","fork":true,"url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid","forks_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/forks","keys_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/teams","hooks_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/hooks","issue_events_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/issues/events{/number}","events_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/events","assignees_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/assignees{/user}","branches_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/branches{/branch}","tags_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/tags","blobs_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/git/refs{/sha}","trees_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/statuses/{sha}","languages_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/languages","stargazers_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/stargazers","contributors_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/contributors","subscribers_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/subscribers","subscription_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/subscription","commits_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/commits{/sha}","git_commits_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/git/commits{/sha}","comments_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/comments{/number}","issue_comment_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/issues/comments{/number}","contents_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/contents/{+path}","compare_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/merges","archive_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/downloads","issues_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/issues{/number}","pulls_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/pulls{/number}","milestones_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/milestones{/number}","notifications_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/labels{/name}","releases_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/releases{/id}","deployments_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/deployments","created_at":"2015-03-30T16:40:21Z","updated_at":"2016-03-25T16:49:24Z","pushed_at":"2016-06-09T21:21:51Z","git_url":"git://github.com/projecthydra-labs/active_fedora-noid.git","ssh_url":"git@github.com:projecthydra-labs/active_fedora-noid.git","clone_url":"https://github.com/projecthydra-labs/active_fedora-noid.git","svn_url":"https://github.com/projecthydra-labs/active_fedora-noid","homepage":null,"size":71,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":5,"forks":3,"open_issues":5,"watchers":1,"default_branch":"master"}},"base":{"label":"projecthydra-labs:master","ref":"master","sha":"2a9ecb21e57fd43cfe2a44fb0e8682527e80544f","user":{"login":"projecthydra-labs","id":7377013,"avatar_url":"https://avatars.githubusercontent.com/u/7377013?v=3","gravatar_id":"","url":"https://api.github.com/users/projecthydra-labs","html_url":"https://github.com/projecthydra-labs","followers_url":"https://api.github.com/users/projecthydra-labs/followers","following_url":"https://api.github.com/users/projecthydra-labs/following{/other_user}","gists_url":"https://api.github.com/users/projecthydra-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/projecthydra-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecthydra-labs/subscriptions","organizations_url":"https://api.github.com/users/projecthydra-labs/orgs","repos_url":"https://api.github.com/users/projecthydra-labs/repos","events_url":"https://api.github.com/users/projecthydra-labs/events{/privacy}","received_events_url":"https://api.github.com/users/projecthydra-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":33135190,"name":"active_fedora-noid","full_name":"projecthydra-labs/active_fedora-noid","owner":{"login":"projecthydra-labs","id":7377013,"avatar_url":"https://avatars.githubusercontent.com/u/7377013?v=3","gravatar_id":"","url":"https://api.github.com/users/projecthydra-labs","html_url":"https://github.com/projecthydra-labs","followers_url":"https://api.github.com/users/projecthydra-labs/followers","following_url":"https://api.github.com/users/projecthydra-labs/following{/other_user}","gists_url":"https://api.github.com/users/projecthydra-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/projecthydra-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecthydra-labs/subscriptions","organizations_url":"https://api.github.com/users/projecthydra-labs/orgs","repos_url":"https://api.github.com/users/projecthydra-labs/repos","events_url":"https://api.github.com/users/projecthydra-labs/events{/privacy}","received_events_url":"https://api.github.com/users/projecthydra-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projecthydra-labs/active_fedora-noid","description":"Noid identifier services for ActiveFedora-based applications","fork":true,"url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid","forks_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/forks","keys_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/teams","hooks_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/hooks","issue_events_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/issues/events{/number}","events_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/events","assignees_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/assignees{/user}","branches_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/branches{/branch}","tags_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/tags","blobs_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/git/refs{/sha}","trees_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/statuses/{sha}","languages_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/languages","stargazers_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/stargazers","contributors_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/contributors","subscribers_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/subscribers","subscription_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/subscription","commits_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/commits{/sha}","git_commits_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/git/commits{/sha}","comments_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/comments{/number}","issue_comment_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/issues/comments{/number}","contents_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/contents/{+path}","compare_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/merges","archive_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/downloads","issues_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/issues{/number}","pulls_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/pulls{/number}","milestones_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/milestones{/number}","notifications_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/labels{/name}","releases_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/releases{/id}","deployments_url":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/deployments","created_at":"2015-03-30T16:40:21Z","updated_at":"2016-03-25T16:49:24Z","pushed_at":"2016-06-09T21:21:51Z","git_url":"git://github.com/projecthydra-labs/active_fedora-noid.git","ssh_url":"git@github.com:projecthydra-labs/active_fedora-noid.git","clone_url":"https://github.com/projecthydra-labs/active_fedora-noid.git","svn_url":"https://github.com/projecthydra-labs/active_fedora-noid","homepage":null,"size":71,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":5,"forks":3,"open_issues":5,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/pulls/25"},"html":{"href":"https://github.com/projecthydra-labs/active_fedora-noid/pull/25"},"issue":{"href":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/issues/25"},"comments":{"href":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/projecthydra-labs/active_fedora-noid/statuses/a0975d1f7c47f18495c21df145e3c724c20ef925"}}}}
{"actor":{"display_login":"jcoyne"}}