Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewc2003 committed Oct 17, 2024
1 parent 031905b commit cc5af0d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions parsl/executors/high_throughput/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,14 @@ def validate_resource_spec(self, resource_specification: dict):
"""HTEX supports the following *Optional* resource specifications:
priority: lower value is higher priority"""
if resource_specification:
acceptable_fields = set(['priority'])
acceptable_fields = {'priority'}
keys = set(resource_specification.keys())
if not keys.issubset(acceptable_fields):
invalid_keys = keys - acceptable_fields
if invalid_keys:
message = "Task resource specification only accepts these types of resources: {}".format(
', '.join(acceptable_fields))
logger.error(message)
raise InvalidResourceSpecification(set(resource_specification.keys()), message)
raise InvalidResourceSpecification(set(invalid_keys), message)
return

def initialize_scaling(self):
Expand Down

0 comments on commit cc5af0d

Please sign in to comment.