Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid to download docs-blob when content is already saved #428

Merged
merged 1 commit into from
Nov 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES/7831.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Avoid to download docs-blob when content is already saved
3 changes: 2 additions & 1 deletion pulp_ansible/app/tasks/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,8 @@ async def _handle_content_unit(self, d_content):
The number of downloads
"""
downloaded = 0
if d_content.d_artifacts:
content_already_saved = not d_content.content._state.adding
if not content_already_saved and d_content.d_artifacts:
remote = d_content.d_artifacts[0].remote
docs_blob = d_content.extra_data.get("docs_blob_url")
if docs_blob:
Expand Down