Skip to content

Commit

Permalink
Cancel ProcessPoolFuture when aborting job
Browse files Browse the repository at this point in the history
Fixes the occasional timeout error in jobs that follow the
`test_abort_fetch_job` test.
  • Loading branch information
mvdbeek committed May 2, 2024
1 parent acec4f6 commit 1bea8a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/galaxy/celery/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ def abort_when_job_stops(function: Callable, session: galaxy_scoped_session, job
return future.result(timeout=1)
except TimeoutError:
if is_aborted(session, job_id):
future.cancel()
return


Expand Down

0 comments on commit 1bea8a7

Please sign in to comment.