Don't add memory_max unless it's greater than memory

This commit is contained in:
Daniel Berteaud 2024-03-26 13:33:48 +01:00
parent c1dd61ce53
commit dc399d86e0
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@
resources {
cpu = [[ $resources.cpu ]]
memory = [[ $resources.memory ]]
[[- if has $resources "memory_max" ]]
[[- if and (has $resources "memory_max") (gt $resources.memory_max $resources.memory) ]]
memory_max = [[ $resources.memory_max ]]
[[- end ]]
}