Skip to content

Commit

Permalink
Merge pull request #60 from mlucool/patch-1
Browse files Browse the repository at this point in the history
Do not warn if mem_warning_threshold is 0
  • Loading branch information
jtpio authored Jul 24, 2020
2 parents f30d1cf + 43e0ecf commit de920c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nbresuse/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async def get(self):
mem_limit = config.mem_limit

limits = {"memory": {"rss": mem_limit}}
if config.mem_limit:
if config.mem_limit and config.mem_warning_threshold != 0:
limits["memory"]["warn"] = (mem_limit - rss) < (
mem_limit * config.mem_warning_threshold
)
Expand Down

0 comments on commit de920c0

Please sign in to comment.