{"action":"created","comment":{"url":"https://api.github.com/repos/theforeman/foreman-tasks/pulls/comments/81696348","pull_request_review_id":2657212,"id":81696348,"diff_hunk":"@@ -0,0 +1,7 @@\n+class AddExclusiveLockIndexes < ActiveRecord::Migration\n+  def change\n+    add_index(:foreman_tasks_locks, [:name, :resource_type, :resource_id, :exclusive],\n+              :name => 'index_foreman_tasks_locks_all_lock_properties')\n+    add_index(:foreman_tasks_locks, :task_id)","path":"db/migrate/20161003091412_add_exclusive_lock_indexes.rb","position":5,"original_position":5,"commit_id":"551b3dc5f506cf7181988bd3a680b01008d41a19","original_commit_id":"551b3dc5f506cf7181988bd3a680b01008d41a19","user":{"login":"adamruzicka","id":7326770,"avatar_url":"https://avatars.githubusercontent.com/u/7326770?v=3","gravatar_id":"","url":"https://api.github.com/users/adamruzicka","html_url":"https://github.com/adamruzicka","followers_url":"https://api.github.com/users/adamruzicka/followers","following_url":"https://api.github.com/users/adamruzicka/following{/other_user}","gists_url":"https://api.github.com/users/adamruzicka/gists{/gist_id}","starred_url":"https://api.github.com/users/adamruzicka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamruzicka/subscriptions","organizations_url":"https://api.github.com/users/adamruzicka/orgs","repos_url":"https://api.github.com/users/adamruzicka/repos","events_url":"https://api.github.com/users/adamruzicka/events{/privacy}","received_events_url":"https://api.github.com/users/adamruzicka/received_events","type":"User","site_admin":false},"body":"There's already an index on this created in `20131209122644_create_foreman_tasks_locks.rb`","created_at":"2016-10-04T07:09:01Z","updated_at":"2016-10-04T07:09:01Z","html_url":"https://github.com/theforeman/foreman-tasks/pull/205#discussion_r81696348","pull_request_url":"https://api.github.com/repos/theforeman/foreman-tasks/pulls/205","_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman-tasks/pulls/comments/81696348"},"html":{"href":"https://github.com/theforeman/foreman-tasks/pull/205#discussion_r81696348"},"pull_request":{"href":"https://api.github.com/repos/theforeman/foreman-tasks/pulls/205"}}},"pull_request":{"url":"https://api.github.com/repos/theforeman/foreman-tasks/pulls/205","id":87672003,"html_url":"https://github.com/theforeman/foreman-tasks/pull/205","diff_url":"https://github.com/theforeman/foreman-tasks/pull/205.diff","patch_url":"https://github.com/theforeman/foreman-tasks/pull/205.patch","issue_url":"https://api.github.com/repos/theforeman/foreman-tasks/issues/205","number":205,"state":"open","locked":false,"title":"Fixes #16779 - add more lock properties indexes","user":{"login":"iNecas","id":190443,"avatar_url":"https://avatars.githubusercontent.com/u/190443?v=3","gravatar_id":"","url":"https://api.github.com/users/iNecas","html_url":"https://github.com/iNecas","followers_url":"https://api.github.com/users/iNecas/followers","following_url":"https://api.github.com/users/iNecas/following{/other_user}","gists_url":"https://api.github.com/users/iNecas/gists{/gist_id}","starred_url":"https://api.github.com/users/iNecas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iNecas/subscriptions","organizations_url":"https://api.github.com/users/iNecas/orgs","repos_url":"https://api.github.com/users/iNecas/repos","events_url":"https://api.github.com/users/iNecas/events{/privacy}","received_events_url":"https://api.github.com/users/iNecas/received_events","type":"User","site_admin":false},"body":"In the lock sql, we also search based on exclusive flag and we join\nbased on task_id. Let's index this as well.","created_at":"2016-10-03T07:16:35Z","updated_at":"2016-10-04T07:09:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b5140d17ad29728144d53a3ff5dd014702c74e70","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/theforeman/foreman-tasks/pulls/205/commits","review_comments_url":"https://api.github.com/repos/theforeman/foreman-tasks/pulls/205/comments","review_comment_url":"https://api.github.com/repos/theforeman/foreman-tasks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/theforeman/foreman-tasks/issues/205/comments","statuses_url":"https://api.github.com/repos/theforeman/foreman-tasks/statuses/551b3dc5f506cf7181988bd3a680b01008d41a19","head":{"label":"iNecas:more-lock-indexes","ref":"more-lock-indexes","sha":"551b3dc5f506cf7181988bd3a680b01008d41a19","user":{"login":"iNecas","id":190443,"avatar_url":"https://avatars.githubusercontent.com/u/190443?v=3","gravatar_id":"","url":"https://api.github.com/users/iNecas","html_url":"https://github.com/iNecas","followers_url":"https://api.github.com/users/iNecas/followers","following_url":"https://api.github.com/users/iNecas/following{/other_user}","gists_url":"https://api.github.com/users/iNecas/gists{/gist_id}","starred_url":"https://api.github.com/users/iNecas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iNecas/subscriptions","organizations_url":"https://api.github.com/users/iNecas/orgs","repos_url":"https://api.github.com/users/iNecas/repos","events_url":"https://api.github.com/users/iNecas/events{/privacy}","received_events_url":"https://api.github.com/users/iNecas/received_events","type":"User","site_admin":false},"repo":{"id":18432639,"name":"foreman-tasks","full_name":"iNecas/foreman-tasks","owner":{"login":"iNecas","id":190443,"avatar_url":"https://avatars.githubusercontent.com/u/190443?v=3","gravatar_id":"","url":"https://api.github.com/users/iNecas","html_url":"https://github.com/iNecas","followers_url":"https://api.github.com/users/iNecas/followers","following_url":"https://api.github.com/users/iNecas/following{/other_user}","gists_url":"https://api.github.com/users/iNecas/gists{/gist_id}","starred_url":"https://api.github.com/users/iNecas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iNecas/subscriptions","organizations_url":"https://api.github.com/users/iNecas/orgs","repos_url":"https://api.github.com/users/iNecas/repos","events_url":"https://api.github.com/users/iNecas/events{/privacy}","received_events_url":"https://api.github.com/users/iNecas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iNecas/foreman-tasks","description":"","fork":true,"url":"https://api.github.com/repos/iNecas/foreman-tasks","forks_url":"https://api.github.com/repos/iNecas/foreman-tasks/forks","keys_url":"https://api.github.com/repos/iNecas/foreman-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iNecas/foreman-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iNecas/foreman-tasks/teams","hooks_url":"https://api.github.com/repos/iNecas/foreman-tasks/hooks","issue_events_url":"https://api.github.com/repos/iNecas/foreman-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/iNecas/foreman-tasks/events","assignees_url":"https://api.github.com/repos/iNecas/foreman-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/iNecas/foreman-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/iNecas/foreman-tasks/tags","blobs_url":"https://api.github.com/repos/iNecas/foreman-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iNecas/foreman-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iNecas/foreman-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/iNecas/foreman-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iNecas/foreman-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/iNecas/foreman-tasks/languages","stargazers_url":"https://api.github.com/repos/iNecas/foreman-tasks/stargazers","contributors_url":"https://api.github.com/repos/iNecas/foreman-tasks/contributors","subscribers_url":"https://api.github.com/repos/iNecas/foreman-tasks/subscribers","subscription_url":"https://api.github.com/repos/iNecas/foreman-tasks/subscription","commits_url":"https://api.github.com/repos/iNecas/foreman-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/iNecas/foreman-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/iNecas/foreman-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/iNecas/foreman-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/iNecas/foreman-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/iNecas/foreman-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iNecas/foreman-tasks/merges","archive_url":"https://api.github.com/repos/iNecas/foreman-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iNecas/foreman-tasks/downloads","issues_url":"https://api.github.com/repos/iNecas/foreman-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/iNecas/foreman-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/iNecas/foreman-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/iNecas/foreman-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iNecas/foreman-tasks/labels{/name}","releases_url":"https://api.github.com/repos/iNecas/foreman-tasks/releases{/id}","deployments_url":"https://api.github.com/repos/iNecas/foreman-tasks/deployments","created_at":"2014-04-04T08:33:37Z","updated_at":"2015-07-01T23:59:25Z","pushed_at":"2016-10-03T19:29:45Z","git_url":"git://github.com/iNecas/foreman-tasks.git","ssh_url":"git@github.com:iNecas/foreman-tasks.git","clone_url":"https://github.com/iNecas/foreman-tasks.git","svn_url":"https://github.com/iNecas/foreman-tasks","homepage":null,"size":523,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"theforeman:master","ref":"master","sha":"4868e9df20c86fb54ab182fca4e7c1dd8fd8b6d0","user":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"repo":{"id":14981691,"name":"foreman-tasks","full_name":"theforeman/foreman-tasks","owner":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/theforeman/foreman-tasks","description":"Tasks management engine and plugin for Foreman","fork":false,"url":"https://api.github.com/repos/theforeman/foreman-tasks","forks_url":"https://api.github.com/repos/theforeman/foreman-tasks/forks","keys_url":"https://api.github.com/repos/theforeman/foreman-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theforeman/foreman-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theforeman/foreman-tasks/teams","hooks_url":"https://api.github.com/repos/theforeman/foreman-tasks/hooks","issue_events_url":"https://api.github.com/repos/theforeman/foreman-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/theforeman/foreman-tasks/events","assignees_url":"https://api.github.com/repos/theforeman/foreman-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/theforeman/foreman-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/theforeman/foreman-tasks/tags","blobs_url":"https://api.github.com/repos/theforeman/foreman-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theforeman/foreman-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theforeman/foreman-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/theforeman/foreman-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theforeman/foreman-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/theforeman/foreman-tasks/languages","stargazers_url":"https://api.github.com/repos/theforeman/foreman-tasks/stargazers","contributors_url":"https://api.github.com/repos/theforeman/foreman-tasks/contributors","subscribers_url":"https://api.github.com/repos/theforeman/foreman-tasks/subscribers","subscription_url":"https://api.github.com/repos/theforeman/foreman-tasks/subscription","commits_url":"https://api.github.com/repos/theforeman/foreman-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/theforeman/foreman-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/theforeman/foreman-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/theforeman/foreman-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/theforeman/foreman-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/theforeman/foreman-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theforeman/foreman-tasks/merges","archive_url":"https://api.github.com/repos/theforeman/foreman-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theforeman/foreman-tasks/downloads","issues_url":"https://api.github.com/repos/theforeman/foreman-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/theforeman/foreman-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/theforeman/foreman-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/theforeman/foreman-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theforeman/foreman-tasks/labels{/name}","releases_url":"https://api.github.com/repos/theforeman/foreman-tasks/releases{/id}","deployments_url":"https://api.github.com/repos/theforeman/foreman-tasks/deployments","created_at":"2013-12-06T11:52:00Z","updated_at":"2016-07-25T17:06:38Z","pushed_at":"2016-10-03T19:33:08Z","git_url":"git://github.com/theforeman/foreman-tasks.git","ssh_url":"git@github.com:theforeman/foreman-tasks.git","clone_url":"https://github.com/theforeman/foreman-tasks.git","svn_url":"https://github.com/theforeman/foreman-tasks","homepage":"http://projects.theforeman.org/projects/foreman-tasks/","size":594,"stargazers_count":10,"watchers_count":10,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":40,"mirror_url":null,"open_issues_count":11,"forks":40,"open_issues":11,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman-tasks/pulls/205"},"html":{"href":"https://github.com/theforeman/foreman-tasks/pull/205"},"issue":{"href":"https://api.github.com/repos/theforeman/foreman-tasks/issues/205"},"comments":{"href":"https://api.github.com/repos/theforeman/foreman-tasks/issues/205/comments"},"review_comments":{"href":"https://api.github.com/repos/theforeman/foreman-tasks/pulls/205/comments"},"review_comment":{"href":"https://api.github.com/repos/theforeman/foreman-tasks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/theforeman/foreman-tasks/pulls/205/commits"},"statuses":{"href":"https://api.github.com/repos/theforeman/foreman-tasks/statuses/551b3dc5f506cf7181988bd3a680b01008d41a19"}}}}
{"actor":{"display_login":"adamruzicka"}}