Skip to content

Commit

Permalink
Fixed wrong condition
Browse files Browse the repository at this point in the history
  • Loading branch information
fbarreir committed Mar 21, 2024
1 parent ee352eb commit b488caf
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pandaharvester/harvesterworkermaker/simple_worker_maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,8 @@ def make_worker(self, jobspec_list, queue_config, job_type, resource_type):
work_spec.nCore = site_corecount
work_spec.minRamCount = site_maxrss
else:
if not len(jobspec_list) and self.rt_mapper.is_valid_resource_type(resource_type):
if not len(jobspec_list) and not self.rt_mapper.is_valid_resource_type(resource_type):
# some testing PQs have ucore + pure pull, need to default to the basic 1-core resource type
tmp_log.warning(
f"{resource_type} -> {type(resource_type)}, {self.rt_mapper.resource_types}, {resource_type in self.rt_mapper.resource_types}"
)
tmp_log.warning(f'Invalid resource type "{resource_type}" (perhaps due to ucore with pure pull); default to the basic 1-core resource type')
resource_type = BASIC_RESOURCE_TYPE_SINGLE_CORE
work_spec.nCore, work_spec.minRamCount = self.rt_mapper.calculate_worker_requirements(resource_type, queue_dict)
Expand Down

0 comments on commit b488caf

Please sign in to comment.