Skip to content
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
2 changes: 2 additions & 0 deletions CHANGES/446.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Changed the use of ``dispatch`` to match the signature from pulpcore>=3.15.
(backported from #443)
4 changes: 2 additions & 2 deletions pulp_python/app/pypi/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def upload(self, request, path):
if settings.PYTHON_GROUP_UPLOADS:
return self.upload_package_group(repo, artifact, filename, request.session)

result = dispatch(tasks.upload, [artifact, repo],
result = dispatch(tasks.upload, exclusive_resources=[artifact, repo],
kwargs={"artifact_sha256": artifact.sha256,
"filename": filename,
"repository_pk": str(repo.pk)})
Expand Down Expand Up @@ -164,7 +164,7 @@ def create_group_upload_task(self, cur_session, repository, artifact, filename,
cur_session['artifacts'] = [(str(artifact.sha256), filename)]
cur_session.modified = False
cur_session.save()
result = dispatch(tasks.upload_group, [artifact, repository],
result = dispatch(tasks.upload_group, exclusive_resources=[artifact, repository],
kwargs={"session_pk": str(cur_session.session_key),
"repository_pk": str(repository.pk)})
return reverse('tasks-detail', args=[result.pk], request=None)
Expand Down
4 changes: 2 additions & 2 deletions pulp_python/app/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def sync(self, request, pk):

result = dispatch(
tasks.sync,
[repository, remote],
exclusive_resources=[repository, remote],
kwargs={
'remote_pk': str(remote.pk),
'repository_pk': str(repository.pk),
Expand Down Expand Up @@ -214,7 +214,7 @@ def create(self, request):

result = dispatch(
tasks.publish,
[repository_version.repository],
exclusive_resources=[repository_version.repository],
kwargs={
'repository_version_pk': str(repository_version.pk)
}
Expand Down