commit/galaxy-central: natefoo: Delete/stop jobs when a history is deleted.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/1528410bbe97/ Changeset: 1528410bbe97 User: natefoo Date: 2013-05-02 21:50:00 Summary: Delete/stop jobs when a history is deleted. Affected #: 1 file diff -r 3044a594eef9868f41d90b43f1c993def91abe9e -r 1528410bbe976f425df16de8ee81c49c5a0432da lib/galaxy/webapps/galaxy/controllers/history.py --- a/lib/galaxy/webapps/galaxy/controllers/history.py +++ b/lib/galaxy/webapps/galaxy/controllers/history.py @@ -562,6 +562,12 @@ history.purged = True self.sa_session.add( history ) self.sa_session.flush() + for hda in history.datasets: + job = hda.creating_job_associations[0].job + if job.history_id == history.id and job.state in [ trans.app.model.Job.states.QUEUED, trans.app.model.Job.states.RUNNING, trans.app.model.Job.states.NEW ]: + # No need to check other outputs since the job's parent history is this history + job.mark_deleted( trans.app.config.track_jobs_in_database ) + trans.app.job_manager.job_stop_queue.put( job.id ) # Regardless of whether it was previously deleted, we make a new history active trans.new_history() return trans.show_ok_message( "History deleted, a new history is active", refresh_frames=['history'] ) Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org