Skip to content

Commit

Permalink
When rerunning a job w/ remap, reassociate PostJobActions when possib…
Browse files Browse the repository at this point in the history
…le to the new job.
  • Loading branch information
dannon committed Sep 15, 2015
1 parent 36809cd commit 23051da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/galaxy/tools/actions/__init__.py
Expand Up @@ -441,6 +441,9 @@ def handle_output( name, output ):
assert old_job.session_id == galaxy_session.id, '(%s/%s): Old session id (%s) does not match rerun session id (%s)' % (old_job.id, job.id, old_job.session_id, galaxy_session.id)
else:
raise Exception('(%s/%s): Remapping via the API is not (yet) supported' % (old_job.id, job.id))
# Duplicate PJAs before remap.
for pjaa in old_job.post_job_actions:
job.add_post_job_action(pjaa.post_job_action)
for jtod in old_job.output_datasets:
for (job_to_remap, jtid) in [(jtid.job, jtid) for jtid in jtod.dataset.dependent_jobs]:
if (trans.user is not None and job_to_remap.user_id == trans.user.id) or (trans.user is None and job_to_remap.session_id == galaxy_session.id):
Expand Down

0 comments on commit 23051da

Please sign in to comment.