Skip to content

Commit

Permalink
Merge branch 'release_16.04' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Jul 19, 2016
2 parents d351121 + 8a5042d commit e1e0a3b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
13 changes: 10 additions & 3 deletions lib/galaxy/jobs/actions/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,13 +427,20 @@ def execute(cls, app, sa_session, action, job, replacement_dict):
else:
log.debug("No job found yet for wfi_step %s, (step %s)" % (wfi_step, wfi_step.workflow_step))
for j2c in jobs_to_check:
sa_session.refresh(j2c)
creating_jobs = []
for input_dataset in j2c.input_datasets:
if not input_dataset.dataset:
log.debug("PJA Async Issue: No dataset attached to input_dataset %s during handling of workflow invocation %s" % (input_dataset.id, wfi))
elif not input_dataset.dataset.creating_job:
log.debug("PJA Async Issue: No creating job attached to dataset %s during handling of workflow invocation %s" % (input_dataset.dataset.id, wfi))
else:
creating_jobs.append((input_dataset, input_dataset.dataset.creating_job))
for (input_dataset, creating_job) in creating_jobs:
sa_session.refresh(creating_job)
sa_session.refresh(input_dataset)
sa_session.refresh(input_dataset.dataset.creating_job)
creating_jobs.append( (input_dataset, input_dataset.dataset.creating_job) )
for input_dataset in [x.dataset for (x, creating_job) in creating_jobs if creating_job.workflow_invocation_step and creating_job.workflow_invocation_step.workflow_invocation == wfi]:
# note that the above input_dataset is a reference to a
# job.input_dataset.dataset at this point
safe_to_delete = True
for job_to_check in [d_j.job for d_j in input_dataset.dependent_jobs]:
if job_to_check != job and job_to_check.state not in [job.states.OK, job.states.DELETED]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ def prepare_step( self, tool_dependency, action_elem, action_dict, install_envir
url_template_elem = tool_dependency_util.get_download_url_for_platform( url_template_elems, platform_info_dict )
else:
url_template_elem = url_template_elems[ 0 ]
action_dict[ 'url' ] = Template( url_template_elem.text ).safe_substitute( platform_info_dict )
action_dict[ 'url' ] = Template( url_template_elem.text.strip() ).safe_substitute( platform_info_dict )
action_dict[ 'target_directory' ] = action_elem.get( 'target_directory', None )
action_dict.update( self.get_elem_checksums( action_elem ) )
return action_dict
Expand Down Expand Up @@ -1175,7 +1175,7 @@ class SetupPerlEnvironment( Download, RecipeStep ):

def __init__( self, app ):
self.app = app
self.type = 'setup_purl_environment'
self.type = 'setup_perl_environment'

def execute_step( self, tool_dependency, package_name, actions, action_dict, filtered_actions, env_file_builder,
install_environment, work_dir, current_dir=None, initial_download=False ):
Expand Down

0 comments on commit e1e0a3b

Please sign in to comment.