{"action":"created","comment":{"url":"https://api.github.com/repos/pulp/pulp/pulls/comments/81838670","pull_request_review_id":2789572,"id":81838670,"diff_hunk":"@@ -1,20 +1,22 @@\n-from contextlib import suppress\n-from gettext import gettext as _\n import logging\n import time\n import traceback\n import uuid\n+from contextlib import suppress\n+from gettext import gettext as _\n \n-from celery import task, Task as CeleryTask, current_task\n+from celery import Task as CeleryTask\n+from celery import current_task, task\n from celery.app import control\n from celery.result import AsyncResult\n from django.db.models import Count\n \n-from pulp.app.models import Worker, ReservedResource, Task as TaskStatus\n-from pulp.common import TASK_FINAL_STATES, TASK_INCOMPLETE_STATES, TASK_STATES\n-from pulp.exceptions import PulpException, MissingResource, PulpCodedException\n-from pulp.tasking.celery_instance import celery, RESOURCE_MANAGER_QUEUE, DEDICATED_QUEUE_EXCHANGE\n-\n+from pulp.app.models import Task as TaskStatus\n+from pulp.app.models import ReservedResource, TaskLock, Worker\n+from pulp.common import (\n+    RESOURCE_MANAGER_WORKER_NAME, TASK_FINAL_STATES, TASK_INCOMPLETE_STATES, TASK_STATES)\n+from pulp.exceptions import MissingResource, PulpCodedException\n+from pulp.tasking.celery_instance import DEDICATED_QUEUE_EXCHANGE, RESOURCE_MANAGER_QUEUE, celery","path":"tasking/pulp/tasking/base.py","position":null,"original_position":27,"commit_id":"73c7e621d80b46cc6877d969ce27c5cfa7b26ea2","original_commit_id":"919535d46e8a63e05e5a0e97916836122f02854c","user":{"login":"bmbouter","id":180319,"avatar_url":"https://avatars.githubusercontent.com/u/180319?v=3","gravatar_id":"","url":"https://api.github.com/users/bmbouter","html_url":"https://github.com/bmbouter","followers_url":"https://api.github.com/users/bmbouter/followers","following_url":"https://api.github.com/users/bmbouter/following{/other_user}","gists_url":"https://api.github.com/users/bmbouter/gists{/gist_id}","starred_url":"https://api.github.com/users/bmbouter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmbouter/subscriptions","organizations_url":"https://api.github.com/users/bmbouter/orgs","repos_url":"https://api.github.com/users/bmbouter/repos","events_url":"https://api.github.com/users/bmbouter/events{/privacy}","received_events_url":"https://api.github.com/users/bmbouter/received_events","type":"User","site_admin":false},"body":"I recommend making it two lines:\r\nThis is really a matter of opinion. I'm OK with whatever you decided to do here. My recommendation is:\r\n\r\n```\r\nfrom pulp.tasking.celery_instance import celery\r\nfrom pulp.tasking.celery_instance import DEDICATED_QUEUE_EXCHANGE, RESOURCE_MANAGER_QUEUE\r\n```","created_at":"2016-10-04T19:50:55Z","updated_at":"2016-10-04T19:50:55Z","html_url":"https://github.com/pulp/pulp/pull/2772#discussion_r81838670","pull_request_url":"https://api.github.com/repos/pulp/pulp/pulls/2772","_links":{"self":{"href":"https://api.github.com/repos/pulp/pulp/pulls/comments/81838670"},"html":{"href":"https://github.com/pulp/pulp/pull/2772#discussion_r81838670"},"pull_request":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2772"}}},"pull_request":{"url":"https://api.github.com/repos/pulp/pulp/pulls/2772","id":87121794,"html_url":"https://github.com/pulp/pulp/pull/2772","diff_url":"https://github.com/pulp/pulp/pull/2772.diff","patch_url":"https://github.com/pulp/pulp/pull/2772.patch","issue_url":"https://api.github.com/repos/pulp/pulp/issues/2772","number":2772,"state":"open","locked":false,"title":"Convert pulp_resource_manager to use a django lock model","user":{"login":"BrnoPCmaniak","id":1249759,"avatar_url":"https://avatars.githubusercontent.com/u/1249759?v=3","gravatar_id":"","url":"https://api.github.com/users/BrnoPCmaniak","html_url":"https://github.com/BrnoPCmaniak","followers_url":"https://api.github.com/users/BrnoPCmaniak/followers","following_url":"https://api.github.com/users/BrnoPCmaniak/following{/other_user}","gists_url":"https://api.github.com/users/BrnoPCmaniak/gists{/gist_id}","starred_url":"https://api.github.com/users/BrnoPCmaniak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrnoPCmaniak/subscriptions","organizations_url":"https://api.github.com/users/BrnoPCmaniak/orgs","repos_url":"https://api.github.com/users/BrnoPCmaniak/repos","events_url":"https://api.github.com/users/BrnoPCmaniak/events{/privacy}","received_events_url":"https://api.github.com/users/BrnoPCmaniak/received_events","type":"User","site_admin":false},"body":"closes #2156\r\nhttps://pulp.plan.io/issues/2156\r\n\r\nThis PR have to be merged into code created by https://github.com/pulp/pulp/pull/2771.","created_at":"2016-09-28T13:39:50Z","updated_at":"2016-10-04T19:50:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"567290819129a940708e714ee81e6fd7218e5fe9","assignee":{"login":"bmbouter","id":180319,"avatar_url":"https://avatars.githubusercontent.com/u/180319?v=3","gravatar_id":"","url":"https://api.github.com/users/bmbouter","html_url":"https://github.com/bmbouter","followers_url":"https://api.github.com/users/bmbouter/followers","following_url":"https://api.github.com/users/bmbouter/following{/other_user}","gists_url":"https://api.github.com/users/bmbouter/gists{/gist_id}","starred_url":"https://api.github.com/users/bmbouter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmbouter/subscriptions","organizations_url":"https://api.github.com/users/bmbouter/orgs","repos_url":"https://api.github.com/users/bmbouter/repos","events_url":"https://api.github.com/users/bmbouter/events{/privacy}","received_events_url":"https://api.github.com/users/bmbouter/received_events","type":"User","site_admin":false},"assignees":[{"login":"bmbouter","id":180319,"avatar_url":"https://avatars.githubusercontent.com/u/180319?v=3","gravatar_id":"","url":"https://api.github.com/users/bmbouter","html_url":"https://github.com/bmbouter","followers_url":"https://api.github.com/users/bmbouter/followers","following_url":"https://api.github.com/users/bmbouter/following{/other_user}","gists_url":"https://api.github.com/users/bmbouter/gists{/gist_id}","starred_url":"https://api.github.com/users/bmbouter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmbouter/subscriptions","organizations_url":"https://api.github.com/users/bmbouter/orgs","repos_url":"https://api.github.com/users/bmbouter/repos","events_url":"https://api.github.com/users/bmbouter/events{/privacy}","received_events_url":"https://api.github.com/users/bmbouter/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/pulp/pulp/pulls/2772/commits","review_comments_url":"https://api.github.com/repos/pulp/pulp/pulls/2772/comments","review_comment_url":"https://api.github.com/repos/pulp/pulp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pulp/pulp/issues/2772/comments","statuses_url":"https://api.github.com/repos/pulp/pulp/statuses/73c7e621d80b46cc6877d969ce27c5cfa7b26ea2","head":{"label":"BrnoPCmaniak:pulp_resource_manager","ref":"pulp_resource_manager","sha":"73c7e621d80b46cc6877d969ce27c5cfa7b26ea2","user":{"login":"BrnoPCmaniak","id":1249759,"avatar_url":"https://avatars.githubusercontent.com/u/1249759?v=3","gravatar_id":"","url":"https://api.github.com/users/BrnoPCmaniak","html_url":"https://github.com/BrnoPCmaniak","followers_url":"https://api.github.com/users/BrnoPCmaniak/followers","following_url":"https://api.github.com/users/BrnoPCmaniak/following{/other_user}","gists_url":"https://api.github.com/users/BrnoPCmaniak/gists{/gist_id}","starred_url":"https://api.github.com/users/BrnoPCmaniak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrnoPCmaniak/subscriptions","organizations_url":"https://api.github.com/users/BrnoPCmaniak/orgs","repos_url":"https://api.github.com/users/BrnoPCmaniak/repos","events_url":"https://api.github.com/users/BrnoPCmaniak/events{/privacy}","received_events_url":"https://api.github.com/users/BrnoPCmaniak/received_events","type":"User","site_admin":false},"repo":{"id":62882517,"name":"pulp","full_name":"BrnoPCmaniak/pulp","owner":{"login":"BrnoPCmaniak","id":1249759,"avatar_url":"https://avatars.githubusercontent.com/u/1249759?v=3","gravatar_id":"","url":"https://api.github.com/users/BrnoPCmaniak","html_url":"https://github.com/BrnoPCmaniak","followers_url":"https://api.github.com/users/BrnoPCmaniak/followers","following_url":"https://api.github.com/users/BrnoPCmaniak/following{/other_user}","gists_url":"https://api.github.com/users/BrnoPCmaniak/gists{/gist_id}","starred_url":"https://api.github.com/users/BrnoPCmaniak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrnoPCmaniak/subscriptions","organizations_url":"https://api.github.com/users/BrnoPCmaniak/orgs","repos_url":"https://api.github.com/users/BrnoPCmaniak/repos","events_url":"https://api.github.com/users/BrnoPCmaniak/events{/privacy}","received_events_url":"https://api.github.com/users/BrnoPCmaniak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BrnoPCmaniak/pulp","description":"Repository for Pulp platform code, including the server and base admin and consumer clients","fork":true,"url":"https://api.github.com/repos/BrnoPCmaniak/pulp","forks_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/forks","keys_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/teams","hooks_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/hooks","issue_events_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/issues/events{/number}","events_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/events","assignees_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/assignees{/user}","branches_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/branches{/branch}","tags_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/tags","blobs_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/git/refs{/sha}","trees_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/statuses/{sha}","languages_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/languages","stargazers_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/stargazers","contributors_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/contributors","subscribers_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/subscribers","subscription_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/subscription","commits_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/commits{/sha}","git_commits_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/git/commits{/sha}","comments_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/comments{/number}","issue_comment_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/issues/comments{/number}","contents_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/contents/{+path}","compare_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/merges","archive_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/downloads","issues_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/issues{/number}","pulls_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/pulls{/number}","milestones_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/milestones{/number}","notifications_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/labels{/name}","releases_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/releases{/id}","deployments_url":"https://api.github.com/repos/BrnoPCmaniak/pulp/deployments","created_at":"2016-07-08T11:02:40Z","updated_at":"2016-07-08T11:02:45Z","pushed_at":"2016-10-04T19:23:21Z","git_url":"git://github.com/BrnoPCmaniak/pulp.git","ssh_url":"git@github.com:BrnoPCmaniak/pulp.git","clone_url":"https://github.com/BrnoPCmaniak/pulp.git","svn_url":"https://github.com/BrnoPCmaniak/pulp","homepage":"","size":92239,"stargazers_count":0,"watchers_count":0,"language":"Python","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":0,"default_branch":"master"}},"base":{"label":"pulp:3.0-dev","ref":"3.0-dev","sha":"5b66ad9e5c10c6d5926d8fdd5f57a447e4e878d2","user":{"login":"pulp","id":2103606,"avatar_url":"https://avatars.githubusercontent.com/u/2103606?v=3","gravatar_id":"","url":"https://api.github.com/users/pulp","html_url":"https://github.com/pulp","followers_url":"https://api.github.com/users/pulp/followers","following_url":"https://api.github.com/users/pulp/following{/other_user}","gists_url":"https://api.github.com/users/pulp/gists{/gist_id}","starred_url":"https://api.github.com/users/pulp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulp/subscriptions","organizations_url":"https://api.github.com/users/pulp/orgs","repos_url":"https://api.github.com/users/pulp/repos","events_url":"https://api.github.com/users/pulp/events{/privacy}","received_events_url":"https://api.github.com/users/pulp/received_events","type":"Organization","site_admin":false},"repo":{"id":5314652,"name":"pulp","full_name":"pulp/pulp","owner":{"login":"pulp","id":2103606,"avatar_url":"https://avatars.githubusercontent.com/u/2103606?v=3","gravatar_id":"","url":"https://api.github.com/users/pulp","html_url":"https://github.com/pulp","followers_url":"https://api.github.com/users/pulp/followers","following_url":"https://api.github.com/users/pulp/following{/other_user}","gists_url":"https://api.github.com/users/pulp/gists{/gist_id}","starred_url":"https://api.github.com/users/pulp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulp/subscriptions","organizations_url":"https://api.github.com/users/pulp/orgs","repos_url":"https://api.github.com/users/pulp/repos","events_url":"https://api.github.com/users/pulp/events{/privacy}","received_events_url":"https://api.github.com/users/pulp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pulp/pulp","description":"Repository for Pulp platform code, including the server and base admin and consumer clients","fork":false,"url":"https://api.github.com/repos/pulp/pulp","forks_url":"https://api.github.com/repos/pulp/pulp/forks","keys_url":"https://api.github.com/repos/pulp/pulp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pulp/pulp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pulp/pulp/teams","hooks_url":"https://api.github.com/repos/pulp/pulp/hooks","issue_events_url":"https://api.github.com/repos/pulp/pulp/issues/events{/number}","events_url":"https://api.github.com/repos/pulp/pulp/events","assignees_url":"https://api.github.com/repos/pulp/pulp/assignees{/user}","branches_url":"https://api.github.com/repos/pulp/pulp/branches{/branch}","tags_url":"https://api.github.com/repos/pulp/pulp/tags","blobs_url":"https://api.github.com/repos/pulp/pulp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pulp/pulp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pulp/pulp/git/refs{/sha}","trees_url":"https://api.github.com/repos/pulp/pulp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pulp/pulp/statuses/{sha}","languages_url":"https://api.github.com/repos/pulp/pulp/languages","stargazers_url":"https://api.github.com/repos/pulp/pulp/stargazers","contributors_url":"https://api.github.com/repos/pulp/pulp/contributors","subscribers_url":"https://api.github.com/repos/pulp/pulp/subscribers","subscription_url":"https://api.github.com/repos/pulp/pulp/subscription","commits_url":"https://api.github.com/repos/pulp/pulp/commits{/sha}","git_commits_url":"https://api.github.com/repos/pulp/pulp/git/commits{/sha}","comments_url":"https://api.github.com/repos/pulp/pulp/comments{/number}","issue_comment_url":"https://api.github.com/repos/pulp/pulp/issues/comments{/number}","contents_url":"https://api.github.com/repos/pulp/pulp/contents/{+path}","compare_url":"https://api.github.com/repos/pulp/pulp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pulp/pulp/merges","archive_url":"https://api.github.com/repos/pulp/pulp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pulp/pulp/downloads","issues_url":"https://api.github.com/repos/pulp/pulp/issues{/number}","pulls_url":"https://api.github.com/repos/pulp/pulp/pulls{/number}","milestones_url":"https://api.github.com/repos/pulp/pulp/milestones{/number}","notifications_url":"https://api.github.com/repos/pulp/pulp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pulp/pulp/labels{/name}","releases_url":"https://api.github.com/repos/pulp/pulp/releases{/id}","deployments_url":"https://api.github.com/repos/pulp/pulp/deployments","created_at":"2012-08-06T13:49:20Z","updated_at":"2016-09-28T20:39:56Z","pushed_at":"2016-10-04T19:23:21Z","git_url":"git://github.com/pulp/pulp.git","ssh_url":"git@github.com:pulp/pulp.git","clone_url":"https://github.com/pulp/pulp.git","svn_url":"https://github.com/pulp/pulp","homepage":"","size":103102,"stargazers_count":281,"watchers_count":281,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":111,"mirror_url":null,"open_issues_count":15,"forks":111,"open_issues":15,"watchers":281,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2772"},"html":{"href":"https://github.com/pulp/pulp/pull/2772"},"issue":{"href":"https://api.github.com/repos/pulp/pulp/issues/2772"},"comments":{"href":"https://api.github.com/repos/pulp/pulp/issues/2772/comments"},"review_comments":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2772/comments"},"review_comment":{"href":"https://api.github.com/repos/pulp/pulp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2772/commits"},"statuses":{"href":"https://api.github.com/repos/pulp/pulp/statuses/73c7e621d80b46cc6877d969ce27c5cfa7b26ea2"}}}}
{"actor":{"display_login":"bmbouter"}}