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

Adjust dispatch calls to core>=3.15 interface #659

Merged
merged 1 commit into from Oct 5, 2021

Conversation

mdellweg
Copy link
Member

@mdellweg mdellweg commented Oct 4, 2021

fixes # 9483

Maybe we can declare some of the resources shared. LMK if you want to see it in this PR.

@mdellweg mdellweg requested a review from a team as a code owner October 4, 2021 10:41
@pulpbot
Copy link
Member

pulpbot commented Oct 4, 2021

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

Copy link
Member

@fao89 fao89 left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -267,7 +267,7 @@ def sync(self, request, pk):

result = dispatch(
sync_func,
[repository, remote],
exclusive_resources=[repository, remote],
Copy link
Member

Choose a reason for hiding this comment

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

remote can be among shared_resources.

Copy link
Member Author

Choose a reason for hiding this comment

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

I drafted this to be the minimal change to unbreak master, but i can add shared_resources if desired. Not sure if it were a feature though.

@@ -401,7 +401,7 @@ def create(self, request):

config, repos = self._process_config(config)

async_result = dispatch(copy_content, repos, args=[config], kwargs={})
async_result = dispatch(copy_content, exclusive_resources=repos, args=[config], kwargs={})
Copy link
Member

Choose a reason for hiding this comment

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

since this is a content copy operation, the source repo can be among shared_resources, _process_config should be updated so it returns 2 lists of repos.

@mdellweg mdellweg merged commit 5dcf02c into pulp:main Oct 5, 2021
@mdellweg mdellweg deleted the update_dispatch branch October 5, 2021 13:58
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