in gridengine/src/gridengine/hostgroup.py [0:0]
def do_decrement(self, node: Node) -> bool:
"""
pcpu = 10
q1@pcpu=4
q2@pcpu=8
if target is pcpu: pcpu=9, q1@pcpu=4, q2@pcpu=8
if target is q1@ : pcpu=9, q1@pcpu=3, q2@pcpu=8
if target is q2@ : pcpu=9, q1@pcpu=4, q2@pcpu=7
"""
self.bucket_preprocessor(node)
if isinstance(self.value, (str, bool)):
return True
matches = []
for resource_name, value in node.available.items():
if self.pattern.match(resource_name):
matches.append((resource_name, value))
new_floor = node.available[self.resource_name] - self.value
for match, match_value in matches:
if "@" in match and match != self.target_resource:
node.available[match] = min(new_floor, match_value)
return self.child_constraint.do_decrement(node)