Skip to content

Commit

Permalink
Add comments to describe some of the new functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Spelchak committed Feb 13, 2018
1 parent cb28601 commit a5e8d82
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/galaxy/jobs/dynamic_tool_destination.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,8 +796,8 @@ def infinite_defaultdict():
available_rule_types = ['file_size', 'num_input_datasets', 'records', 'arguments']

if obj is not None:
# in obj, there should always be only 4 categories: tools, default_destination,
# users, and verbose
# in obj, there should always be only 5 categories: tools, default_destination,
# default_priority, users, and verbose

if 'default_destination' in obj:
if isinstance(obj['default_destination'], str):
Expand All @@ -815,7 +815,6 @@ def infinite_defaultdict():
isinstance(obj['default_destination']['priority'], dict)):

for priority in obj['default_destination']['priority']:

if isinstance(obj['default_destination']['priority'][priority],
str):
priority_list.add(priority)
Expand Down Expand Up @@ -861,6 +860,8 @@ def infinite_defaultdict():
else:
error = "No default_priority section found in config."
if 'med' in priority_list:
# set 'med' as fallback default priority, so
# old tool_destination.yml configs still work
error += " Setting 'med' as default priority."
new_config['default_priority'] = 'med'
else:
Expand Down Expand Up @@ -1569,6 +1570,7 @@ def get_destination_list_from_job_config(job_config_location='/config/job_conf.x

job_conf = ET.parse(job_config_location)

# Add all destination IDs from the job configuration xml file
for destination in job_conf.getroot().iter("destination"):
if isinstance(destination.get("id"), str):
destination_list.add(destination.get("id"))
Expand Down

0 comments on commit a5e8d82

Please sign in to comment.