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

Reduce amount of time the repository lock is held #314

Closed
wants to merge 1 commit into from
Closed

Reduce amount of time the repository lock is held #314

wants to merge 1 commit into from

Conversation

fao89
Copy link
Member

@fao89 fao89 commented May 19, 2020

@pulpbot
Copy link
Member

pulpbot commented May 19, 2020

Attached issue: https://pulp.plan.io/issues/6677

@fao89 fao89 requested a review from bmbouter May 19, 2020 18:56
@fao89 fao89 marked this pull request as ready for review May 20, 2020 22:26
@@ -195,6 +196,17 @@ def create_collection_from_importer(importer_result):
return collection_version


def add_collection_to_repository(repository_pk, collection_version_pk):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is presumably close enough to the same as https://github.com/ansible/galaxy_ng/blob/master/galaxy_ng/app/tasks/promotion.py#L4
that galaxy_ng should be able to use pulpcore.app.tasks.collections.add_collection_to_repository() once it is merged?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pinging @awcrosby

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that is something we could look at replacing with this

Comment on lines +272 to +280
task = instance.task

completed = ["completed", "failed", "canceled"]

for child in task.child_tasks.all():
if child.state not in completed:
task.state = child.state
task.finished_at = child.finished_at
break
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bmbouter this is what I mentioned felt like a hack

@fao89
Copy link
Member Author

fao89 commented Sep 15, 2020

too old PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants