Skip to content

Commit

Permalink
Stop deleting tasks after uploading manifests
Browse files Browse the repository at this point in the history
Tasks created after uploading manifests are no longer automatically
deleted in any case.

closes: #1602
  • Loading branch information
MichalPysik authored and ipanova committed May 30, 2024
1 parent 5594491 commit 7cab423
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES/1602.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Tasks created after uploading manifests will now remain available for further inspection and will not be deleted.
5 changes: 1 addition & 4 deletions pulp_container/app/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,11 @@ def has_task_completed(dispatched_task, wait_in_seconds=3):
time.sleep(1)
task = Task.objects.get(pk=dispatched_task.pk)
if task.state == "completed":
task.delete()
return True
elif task.state in ["waiting", "running"]:
continue
else:
error = task.error
task.delete()
raise Exception(str(error))
raise Exception(str(task.error))
raise Throttled()


Expand Down

0 comments on commit 7cab423

Please sign in to comment.