{"action":"created","comment":{"url":"https://api.github.com/repos/pulp/pulp/pulls/comments/41671425","id":41671425,"diff_hunk":"@@ -111,83 +126,110 @@ def refresh_content_source(content_source_id=None):\n \n \n @celery.task(base=Task)\n-def _download(plugin_id, unit_locator, url, options):\n+def _download_one(catalog_entry):\n     \"\"\"\n-    Download the specified content unit.\n+    Download the content unit specified by the catalog entry.\n \n-    :param plugin_id: A repository-importer database object ID.\n-    :type plugin_id: str\n-    :param unit_locator: A unit locator.\n-    :type unit_locator: pulp.server.db.model.UnitLocator\n-    :param url: The download URL.\n-    :type url: str\n-    :param options: Passed to the Importer.get_downloader().\n-    :type options: dict\n+    :param catalog_entry: The catalog entry to download content for.\n+    :type  catalog_entry: pulp.server.db.model.LazyCatalogEntry\n     \"\"\"\n-    _logger.info(_('Downloading: {url}').format(url=url))\n+    _logger.info(_('Downloading {url} via the Pulp streamer').format(url=catalog_entry.url))\n \n     # Find the plugin","path":"server/pulp/server/controllers/content.py","position":62,"original_position":62,"commit_id":"b93fff295643133bd448b19a1952ebca2320444f","original_commit_id":"b93fff295643133bd448b19a1952ebca2320444f","user":{"login":"jortel","id":1126767,"avatar_url":"https://avatars.githubusercontent.com/u/1126767?v=3","gravatar_id":"","url":"https://api.github.com/users/jortel","html_url":"https://github.com/jortel","followers_url":"https://api.github.com/users/jortel/followers","following_url":"https://api.github.com/users/jortel/following{/other_user}","gists_url":"https://api.github.com/users/jortel/gists{/gist_id}","starred_url":"https://api.github.com/users/jortel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jortel/subscriptions","organizations_url":"https://api.github.com/users/jortel/orgs","repos_url":"https://api.github.com/users/jortel/repos","events_url":"https://api.github.com/users/jortel/events{/privacy}","received_events_url":"https://api.github.com/users/jortel/received_events","type":"User","site_admin":false},"body":"Comment seems unrelated.","created_at":"2015-10-09T19:54:58Z","updated_at":"2015-10-09T19:54:58Z","html_url":"https://github.com/pulp/pulp/pull/2108#discussion_r41671425","pull_request_url":"https://api.github.com/repos/pulp/pulp/pulls/2108","_links":{"self":{"href":"https://api.github.com/repos/pulp/pulp/pulls/comments/41671425"},"html":{"href":"https://github.com/pulp/pulp/pull/2108#discussion_r41671425"},"pull_request":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2108"}}},"pull_request":{"url":"https://api.github.com/repos/pulp/pulp/pulls/2108","id":47298708,"html_url":"https://github.com/pulp/pulp/pull/2108","diff_url":"https://github.com/pulp/pulp/pull/2108.diff","patch_url":"https://github.com/pulp/pulp/pull/2108.patch","issue_url":"https://api.github.com/repos/pulp/pulp/issues/2108","number":2108,"state":"open","locked":false,"title":"Update the download_one task to use the streamer.","user":{"login":"jeremycline","id":1977525,"avatar_url":"https://avatars.githubusercontent.com/u/1977525?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremycline","html_url":"https://github.com/jeremycline","followers_url":"https://api.github.com/users/jeremycline/followers","following_url":"https://api.github.com/users/jeremycline/following{/other_user}","gists_url":"https://api.github.com/users/jeremycline/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremycline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremycline/subscriptions","organizations_url":"https://api.github.com/users/jeremycline/orgs","repos_url":"https://api.github.com/users/jeremycline/repos","events_url":"https://api.github.com/users/jeremycline/events{/privacy}","received_events_url":"https://api.github.com/users/jeremycline/received_events","type":"User","site_admin":false},"body":"This also updates the streamer to check for a special HTTP header to\r\ndetermine whether or not it should dispatch a task and changes the\r\nstreamer to use the new LazyCatalogEntry model.\r\n\r\nI'm hesitant to write tests for the task just yet, since we may end up changing it quite a bit depending on whether we download entire content units or not.","created_at":"2015-10-09T17:34:11Z","updated_at":"2015-10-09T19:54:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b5f28819a032f856a6f9c2cec4f1f2081fdffd8b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pulp/pulp/pulls/2108/commits","review_comments_url":"https://api.github.com/repos/pulp/pulp/pulls/2108/comments","review_comment_url":"https://api.github.com/repos/pulp/pulp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pulp/pulp/issues/2108/comments","statuses_url":"https://api.github.com/repos/pulp/pulp/statuses/b93fff295643133bd448b19a1952ebca2320444f","head":{"label":"jeremycline:stream-download-one-task","ref":"stream-download-one-task","sha":"b93fff295643133bd448b19a1952ebca2320444f","user":{"login":"jeremycline","id":1977525,"avatar_url":"https://avatars.githubusercontent.com/u/1977525?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremycline","html_url":"https://github.com/jeremycline","followers_url":"https://api.github.com/users/jeremycline/followers","following_url":"https://api.github.com/users/jeremycline/following{/other_user}","gists_url":"https://api.github.com/users/jeremycline/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremycline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremycline/subscriptions","organizations_url":"https://api.github.com/users/jeremycline/orgs","repos_url":"https://api.github.com/users/jeremycline/repos","events_url":"https://api.github.com/users/jeremycline/events{/privacy}","received_events_url":"https://api.github.com/users/jeremycline/received_events","type":"User","site_admin":false},"repo":{"id":24958984,"name":"pulp","full_name":"jeremycline/pulp","owner":{"login":"jeremycline","id":1977525,"avatar_url":"https://avatars.githubusercontent.com/u/1977525?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremycline","html_url":"https://github.com/jeremycline","followers_url":"https://api.github.com/users/jeremycline/followers","following_url":"https://api.github.com/users/jeremycline/following{/other_user}","gists_url":"https://api.github.com/users/jeremycline/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremycline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremycline/subscriptions","organizations_url":"https://api.github.com/users/jeremycline/orgs","repos_url":"https://api.github.com/users/jeremycline/repos","events_url":"https://api.github.com/users/jeremycline/events{/privacy}","received_events_url":"https://api.github.com/users/jeremycline/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jeremycline/pulp","description":"Repository for Pulp platform code, including the server and base admin and consumer clients","fork":true,"url":"https://api.github.com/repos/jeremycline/pulp","forks_url":"https://api.github.com/repos/jeremycline/pulp/forks","keys_url":"https://api.github.com/repos/jeremycline/pulp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jeremycline/pulp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jeremycline/pulp/teams","hooks_url":"https://api.github.com/repos/jeremycline/pulp/hooks","issue_events_url":"https://api.github.com/repos/jeremycline/pulp/issues/events{/number}","events_url":"https://api.github.com/repos/jeremycline/pulp/events","assignees_url":"https://api.github.com/repos/jeremycline/pulp/assignees{/user}","branches_url":"https://api.github.com/repos/jeremycline/pulp/branches{/branch}","tags_url":"https://api.github.com/repos/jeremycline/pulp/tags","blobs_url":"https://api.github.com/repos/jeremycline/pulp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jeremycline/pulp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jeremycline/pulp/git/refs{/sha}","trees_url":"https://api.github.com/repos/jeremycline/pulp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jeremycline/pulp/statuses/{sha}","languages_url":"https://api.github.com/repos/jeremycline/pulp/languages","stargazers_url":"https://api.github.com/repos/jeremycline/pulp/stargazers","contributors_url":"https://api.github.com/repos/jeremycline/pulp/contributors","subscribers_url":"https://api.github.com/repos/jeremycline/pulp/subscribers","subscription_url":"https://api.github.com/repos/jeremycline/pulp/subscription","commits_url":"https://api.github.com/repos/jeremycline/pulp/commits{/sha}","git_commits_url":"https://api.github.com/repos/jeremycline/pulp/git/commits{/sha}","comments_url":"https://api.github.com/repos/jeremycline/pulp/comments{/number}","issue_comment_url":"https://api.github.com/repos/jeremycline/pulp/issues/comments{/number}","contents_url":"https://api.github.com/repos/jeremycline/pulp/contents/{+path}","compare_url":"https://api.github.com/repos/jeremycline/pulp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jeremycline/pulp/merges","archive_url":"https://api.github.com/repos/jeremycline/pulp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jeremycline/pulp/downloads","issues_url":"https://api.github.com/repos/jeremycline/pulp/issues{/number}","pulls_url":"https://api.github.com/repos/jeremycline/pulp/pulls{/number}","milestones_url":"https://api.github.com/repos/jeremycline/pulp/milestones{/number}","notifications_url":"https://api.github.com/repos/jeremycline/pulp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jeremycline/pulp/labels{/name}","releases_url":"https://api.github.com/repos/jeremycline/pulp/releases{/id}","created_at":"2014-10-08T20:18:50Z","updated_at":"2015-01-15T14:25:50Z","pushed_at":"2015-10-09T19:14:36Z","git_url":"git://github.com/jeremycline/pulp.git","ssh_url":"git@github.com:jeremycline/pulp.git","clone_url":"https://github.com/jeremycline/pulp.git","svn_url":"https://github.com/jeremycline/pulp","homepage":"","size":87276,"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:lazy-content","ref":"lazy-content","sha":"9f45008cdafc2e779a602f491b6ce7c2b909a085","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}","created_at":"2012-08-06T13:49:20Z","updated_at":"2015-10-09T10:20:16Z","pushed_at":"2015-10-09T17:34:11Z","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":209310,"stargazers_count":223,"watchers_count":223,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":92,"mirror_url":null,"open_issues_count":15,"forks":92,"open_issues":15,"watchers":223,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2108"},"html":{"href":"https://github.com/pulp/pulp/pull/2108"},"issue":{"href":"https://api.github.com/repos/pulp/pulp/issues/2108"},"comments":{"href":"https://api.github.com/repos/pulp/pulp/issues/2108/comments"},"review_comments":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2108/comments"},"review_comment":{"href":"https://api.github.com/repos/pulp/pulp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2108/commits"},"statuses":{"href":"https://api.github.com/repos/pulp/pulp/statuses/b93fff295643133bd448b19a1952ebca2320444f"}}}}