Skip to content
Open
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
2 changes: 2 additions & 0 deletions CHANGES/plugin_api/+override-modify-task.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Added `modify_task` property to `ModifyRepositoryActionMixin` so plugin writers can override the
task that Pulp calls.
4 changes: 3 additions & 1 deletion pulpcore/plugin/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@


class ModifyRepositoryActionMixin:
modify_task = tasks.repository.add_and_remove

@extend_schema(
description="Trigger an asynchronous task to create a new repository version.",
summary="Modify Repository Content",
Expand All @@ -35,7 +37,7 @@ def modify(self, request, pk):
base_version_pk = None

task = dispatch(
tasks.repository.add_and_remove,
self.modify_task,
exclusive_resources=[repository],
kwargs={
"repository_pk": pk,
Expand Down