Skip to content

Commit

Permalink
Attempt to cancel aborted tasks on worker shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
mdellweg authored and dkliban committed Jul 2, 2021
1 parent 4741d10 commit 6da336e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES/8987.bugfix
@@ -0,0 +1 @@
Added an attempt to cancel a task if a worker needed to abort it on graceful shutdown.
2 changes: 2 additions & 0 deletions pulpcore/tasking/pulpcore_worker.py
Expand Up @@ -206,6 +206,8 @@ def supervise_task(self, task):
else:
_logger.info(f"Aborting current task {task.pk} due to worker shutdown.")
os.kill(task_process.pid, signal.SIGUSR1)
task_process.join()
self.cancel_abandoned_task(task)
break
task_process.join()
if task.reserved_resources_record:
Expand Down

0 comments on commit 6da336e

Please sign in to comment.