mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 10:24:38 +08:00
Enable stopping jobs when history is deleted via the API.
This commit is contained in:
@@ -235,6 +235,10 @@ class HistoriesController( BaseAPIController, UsesHistoryMixin, UsesTagsMixin,
|
||||
for hda in history.datasets:
|
||||
if hda.purged:
|
||||
continue
|
||||
if hda.creating_job_associations:
|
||||
job = hda.creating_job_associations[0].job
|
||||
job.mark_deleted( self.app.config.track_jobs_in_database )
|
||||
self.app.job_manager.job_stop_queue.put( job.id )
|
||||
hda.purged = True
|
||||
trans.sa_session.add( hda )
|
||||
trans.sa_session.flush()
|
||||
|
||||
Reference in New Issue
Block a user