Skip to content

Commit d131aaa

Browse files
authored
Merge pull request #56 from jtpio/fix-cpu-percent
Fix handling of cpu percent in the API endpoint
2 parents 8b48ed9 + 3897820 commit d131aaa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nbresuse/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ async def get(self):
5151
if config.cpu_limit != 0:
5252
limits["cpu"] = {"cpu": config.cpu_limit}
5353
if config.cpu_warning_threshold != 0:
54-
limits["cpu"]["warn"] = (config.cpu_limit - self.cpu_percent) < (
54+
limits["cpu"]["warn"] = (config.cpu_limit - cpu_percent) < (
5555
config.cpu_limit * config.cpu_warning_threshold
5656
)
5757

0 commit comments

Comments
 (0)