{"action":"opened","number":28,"pull_request":{"url":"https://api.github.com/repos/Prismatik/redbeard/pulls/28","id":65944600,"html_url":"https://github.com/Prismatik/redbeard/pull/28","diff_url":"https://github.com/Prismatik/redbeard/pull/28.diff","patch_url":"https://github.com/Prismatik/redbeard/pull/28.patch","issue_url":"https://api.github.com/repos/Prismatik/redbeard/issues/28","number":28,"state":"open","locked":false,"title":"Add mutex to migration runners","user":{"login":"davidbanham","id":631832,"avatar_url":"https://avatars.githubusercontent.com/u/631832?v=3","gravatar_id":"","url":"https://api.github.com/users/davidbanham","html_url":"https://github.com/davidbanham","followers_url":"https://api.github.com/users/davidbanham/followers","following_url":"https://api.github.com/users/davidbanham/following{/other_user}","gists_url":"https://api.github.com/users/davidbanham/gists{/gist_id}","starred_url":"https://api.github.com/users/davidbanham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidbanham/subscriptions","organizations_url":"https://api.github.com/users/davidbanham/orgs","repos_url":"https://api.github.com/users/davidbanham/repos","events_url":"https://api.github.com/users/davidbanham/events{/privacy}","received_events_url":"https://api.github.com/users/davidbanham/received_events","type":"User","site_admin":false},"body":"This prevents two instances of the app from attempting to run migrations at the same time.\r\n\r\nAlso adds helper functions `show_mutex` and `release_mutex` to the migration bin script. These are intended to answer the questions:\r\n\r\n1. Why aren't my migrations running?\r\n2. Which machine failed to run my migrations so I can go look at the logs?\r\n3. Okay, I fixed the problem, please remove that mutex so my migrations can run again.\r\n\r\nThis also splits the env files into `base` and `db` so that the migration runner can demand the db env vars in isolation.","created_at":"2016-04-11T06:15:54Z","updated_at":"2016-04-11T06:15:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Prismatik/redbeard/pulls/28/commits","review_comments_url":"https://api.github.com/repos/Prismatik/redbeard/pulls/28/comments","review_comment_url":"https://api.github.com/repos/Prismatik/redbeard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Prismatik/redbeard/issues/28/comments","statuses_url":"https://api.github.com/repos/Prismatik/redbeard/statuses/dc17b50346343f3f04813863d9c1f93d1434e89d","head":{"label":"Prismatik:distributed-migrations","ref":"distributed-migrations","sha":"dc17b50346343f3f04813863d9c1f93d1434e89d","user":{"login":"Prismatik","id":5928206,"avatar_url":"https://avatars.githubusercontent.com/u/5928206?v=3","gravatar_id":"","url":"https://api.github.com/users/Prismatik","html_url":"https://github.com/Prismatik","followers_url":"https://api.github.com/users/Prismatik/followers","following_url":"https://api.github.com/users/Prismatik/following{/other_user}","gists_url":"https://api.github.com/users/Prismatik/gists{/gist_id}","starred_url":"https://api.github.com/users/Prismatik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Prismatik/subscriptions","organizations_url":"https://api.github.com/users/Prismatik/orgs","repos_url":"https://api.github.com/users/Prismatik/repos","events_url":"https://api.github.com/users/Prismatik/events{/privacy}","received_events_url":"https://api.github.com/users/Prismatik/received_events","type":"Organization","site_admin":false},"repo":{"id":47511251,"name":"redbeard","full_name":"Prismatik/redbeard","owner":{"login":"Prismatik","id":5928206,"avatar_url":"https://avatars.githubusercontent.com/u/5928206?v=3","gravatar_id":"","url":"https://api.github.com/users/Prismatik","html_url":"https://github.com/Prismatik","followers_url":"https://api.github.com/users/Prismatik/followers","following_url":"https://api.github.com/users/Prismatik/following{/other_user}","gists_url":"https://api.github.com/users/Prismatik/gists{/gist_id}","starred_url":"https://api.github.com/users/Prismatik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Prismatik/subscriptions","organizations_url":"https://api.github.com/users/Prismatik/orgs","repos_url":"https://api.github.com/users/Prismatik/repos","events_url":"https://api.github.com/users/Prismatik/events{/privacy}","received_events_url":"https://api.github.com/users/Prismatik/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Prismatik/redbeard","description":"The framework you use when you're not using a framework.","fork":false,"url":"https://api.github.com/repos/Prismatik/redbeard","forks_url":"https://api.github.com/repos/Prismatik/redbeard/forks","keys_url":"https://api.github.com/repos/Prismatik/redbeard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Prismatik/redbeard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Prismatik/redbeard/teams","hooks_url":"https://api.github.com/repos/Prismatik/redbeard/hooks","issue_events_url":"https://api.github.com/repos/Prismatik/redbeard/issues/events{/number}","events_url":"https://api.github.com/repos/Prismatik/redbeard/events","assignees_url":"https://api.github.com/repos/Prismatik/redbeard/assignees{/user}","branches_url":"https://api.github.com/repos/Prismatik/redbeard/branches{/branch}","tags_url":"https://api.github.com/repos/Prismatik/redbeard/tags","blobs_url":"https://api.github.com/repos/Prismatik/redbeard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Prismatik/redbeard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Prismatik/redbeard/git/refs{/sha}","trees_url":"https://api.github.com/repos/Prismatik/redbeard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Prismatik/redbeard/statuses/{sha}","languages_url":"https://api.github.com/repos/Prismatik/redbeard/languages","stargazers_url":"https://api.github.com/repos/Prismatik/redbeard/stargazers","contributors_url":"https://api.github.com/repos/Prismatik/redbeard/contributors","subscribers_url":"https://api.github.com/repos/Prismatik/redbeard/subscribers","subscription_url":"https://api.github.com/repos/Prismatik/redbeard/subscription","commits_url":"https://api.github.com/repos/Prismatik/redbeard/commits{/sha}","git_commits_url":"https://api.github.com/repos/Prismatik/redbeard/git/commits{/sha}","comments_url":"https://api.github.com/repos/Prismatik/redbeard/comments{/number}","issue_comment_url":"https://api.github.com/repos/Prismatik/redbeard/issues/comments{/number}","contents_url":"https://api.github.com/repos/Prismatik/redbeard/contents/{+path}","compare_url":"https://api.github.com/repos/Prismatik/redbeard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Prismatik/redbeard/merges","archive_url":"https://api.github.com/repos/Prismatik/redbeard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Prismatik/redbeard/downloads","issues_url":"https://api.github.com/repos/Prismatik/redbeard/issues{/number}","pulls_url":"https://api.github.com/repos/Prismatik/redbeard/pulls{/number}","milestones_url":"https://api.github.com/repos/Prismatik/redbeard/milestones{/number}","notifications_url":"https://api.github.com/repos/Prismatik/redbeard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Prismatik/redbeard/labels{/name}","releases_url":"https://api.github.com/repos/Prismatik/redbeard/releases{/id}","deployments_url":"https://api.github.com/repos/Prismatik/redbeard/deployments","created_at":"2015-12-06T19:52:38Z","updated_at":"2016-03-14T23:39:07Z","pushed_at":"2016-04-11T06:13:31Z","git_url":"git://github.com/Prismatik/redbeard.git","ssh_url":"git@github.com:Prismatik/redbeard.git","clone_url":"https://github.com/Prismatik/redbeard.git","svn_url":"https://github.com/Prismatik/redbeard","homepage":null,"size":75,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":2,"default_branch":"master"}},"base":{"label":"Prismatik:master","ref":"master","sha":"9bd4b0c74c3d5abc68057ddd11bf43e47fc3e14f","user":{"login":"Prismatik","id":5928206,"avatar_url":"https://avatars.githubusercontent.com/u/5928206?v=3","gravatar_id":"","url":"https://api.github.com/users/Prismatik","html_url":"https://github.com/Prismatik","followers_url":"https://api.github.com/users/Prismatik/followers","following_url":"https://api.github.com/users/Prismatik/following{/other_user}","gists_url":"https://api.github.com/users/Prismatik/gists{/gist_id}","starred_url":"https://api.github.com/users/Prismatik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Prismatik/subscriptions","organizations_url":"https://api.github.com/users/Prismatik/orgs","repos_url":"https://api.github.com/users/Prismatik/repos","events_url":"https://api.github.com/users/Prismatik/events{/privacy}","received_events_url":"https://api.github.com/users/Prismatik/received_events","type":"Organization","site_admin":false},"repo":{"id":47511251,"name":"redbeard","full_name":"Prismatik/redbeard","owner":{"login":"Prismatik","id":5928206,"avatar_url":"https://avatars.githubusercontent.com/u/5928206?v=3","gravatar_id":"","url":"https://api.github.com/users/Prismatik","html_url":"https://github.com/Prismatik","followers_url":"https://api.github.com/users/Prismatik/followers","following_url":"https://api.github.com/users/Prismatik/following{/other_user}","gists_url":"https://api.github.com/users/Prismatik/gists{/gist_id}","starred_url":"https://api.github.com/users/Prismatik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Prismatik/subscriptions","organizations_url":"https://api.github.com/users/Prismatik/orgs","repos_url":"https://api.github.com/users/Prismatik/repos","events_url":"https://api.github.com/users/Prismatik/events{/privacy}","received_events_url":"https://api.github.com/users/Prismatik/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Prismatik/redbeard","description":"The framework you use when you're not using a framework.","fork":false,"url":"https://api.github.com/repos/Prismatik/redbeard","forks_url":"https://api.github.com/repos/Prismatik/redbeard/forks","keys_url":"https://api.github.com/repos/Prismatik/redbeard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Prismatik/redbeard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Prismatik/redbeard/teams","hooks_url":"https://api.github.com/repos/Prismatik/redbeard/hooks","issue_events_url":"https://api.github.com/repos/Prismatik/redbeard/issues/events{/number}","events_url":"https://api.github.com/repos/Prismatik/redbeard/events","assignees_url":"https://api.github.com/repos/Prismatik/redbeard/assignees{/user}","branches_url":"https://api.github.com/repos/Prismatik/redbeard/branches{/branch}","tags_url":"https://api.github.com/repos/Prismatik/redbeard/tags","blobs_url":"https://api.github.com/repos/Prismatik/redbeard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Prismatik/redbeard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Prismatik/redbeard/git/refs{/sha}","trees_url":"https://api.github.com/repos/Prismatik/redbeard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Prismatik/redbeard/statuses/{sha}","languages_url":"https://api.github.com/repos/Prismatik/redbeard/languages","stargazers_url":"https://api.github.com/repos/Prismatik/redbeard/stargazers","contributors_url":"https://api.github.com/repos/Prismatik/redbeard/contributors","subscribers_url":"https://api.github.com/repos/Prismatik/redbeard/subscribers","subscription_url":"https://api.github.com/repos/Prismatik/redbeard/subscription","commits_url":"https://api.github.com/repos/Prismatik/redbeard/commits{/sha}","git_commits_url":"https://api.github.com/repos/Prismatik/redbeard/git/commits{/sha}","comments_url":"https://api.github.com/repos/Prismatik/redbeard/comments{/number}","issue_comment_url":"https://api.github.com/repos/Prismatik/redbeard/issues/comments{/number}","contents_url":"https://api.github.com/repos/Prismatik/redbeard/contents/{+path}","compare_url":"https://api.github.com/repos/Prismatik/redbeard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Prismatik/redbeard/merges","archive_url":"https://api.github.com/repos/Prismatik/redbeard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Prismatik/redbeard/downloads","issues_url":"https://api.github.com/repos/Prismatik/redbeard/issues{/number}","pulls_url":"https://api.github.com/repos/Prismatik/redbeard/pulls{/number}","milestones_url":"https://api.github.com/repos/Prismatik/redbeard/milestones{/number}","notifications_url":"https://api.github.com/repos/Prismatik/redbeard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Prismatik/redbeard/labels{/name}","releases_url":"https://api.github.com/repos/Prismatik/redbeard/releases{/id}","deployments_url":"https://api.github.com/repos/Prismatik/redbeard/deployments","created_at":"2015-12-06T19:52:38Z","updated_at":"2016-03-14T23:39:07Z","pushed_at":"2016-04-11T06:13:31Z","git_url":"git://github.com/Prismatik/redbeard.git","ssh_url":"git@github.com:Prismatik/redbeard.git","clone_url":"https://github.com/Prismatik/redbeard.git","svn_url":"https://github.com/Prismatik/redbeard","homepage":null,"size":75,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Prismatik/redbeard/pulls/28"},"html":{"href":"https://github.com/Prismatik/redbeard/pull/28"},"issue":{"href":"https://api.github.com/repos/Prismatik/redbeard/issues/28"},"comments":{"href":"https://api.github.com/repos/Prismatik/redbeard/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/Prismatik/redbeard/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/Prismatik/redbeard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Prismatik/redbeard/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/Prismatik/redbeard/statuses/dc17b50346343f3f04813863d9c1f93d1434e89d"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":70,"deletions":18,"changed_files":5}}