in gridengine/src/gridengine/driver.py [0:0]
def do_apply_constraints() -> None:
_apply_constraints(
jijle=jijle,
job_id=job_id,
ge_queue=ge_queue,
ge_env=ge_env,
job_resources={},
constraints_out=constraints,
)
queue_and_hostgroup_constraints = []
for pe in pes:
hostgroups = ge_queue.get_hostgroups_for_pe(pe.name)
# optional - can be None if this is an htc style bucket.
placement_group = ge_queue.get_placement_group(pe.name)
for hg_name in hostgroups:
hostgroup = ge_queue.bound_hostgroups[hg_name]
child_constraint = hostgroup.make_constraint(ge_env, owner, project, constraints[0]) # type: ignore
queue_and_hostgroup_constraints.append(
HostgroupConstraint(
config, hostgroup, placement_group, child_constraint
)
)
if len(queue_and_hostgroup_constraints) > 1:
constraints.append(XOr(*queue_and_hostgroup_constraints))
else:
constraints.append(queue_and_hostgroup_constraints[0])