Commit ead82f1b authored by Cool Fire's avatar Cool Fire

Change CPU limit text to reflect it is now a hard cap rather than a max share

parent 4f5ef0d5
Pipeline #1264 failed with stage
in 4 minutes and 2 seconds
......@@ -22,9 +22,9 @@ class Manager2Api < Sinatra::Base
# CPU limits
def limit_cpu_get(username)
data = git_get
return 'No process limit set, defaults apply' unless data[username]['properties'].key? 'cgroups'
return 'No CPU cap set' unless data[username]['properties'].key? 'cgroups'
return 'No process limit set, defaults apply' unless data[username]['properties']['cgroups'].key? 'cpu'
return 'No CPU cap set' unless data[username]['properties']['cgroups'].key? 'cpu'
......@@ -34,7 +34,7 @@ class Manager2Api < Sinatra::Base
data[username]['properties']['cgroups'] = {} unless data[username]['properties'].key? 'cgroups'
data[username]['properties']['cgroups']['cpu'] = limit
git_put data, "Set cpu shares; user: #{username}, limit: #{limit}"
git_put data, "Set CPU cap; user: #{username}, cap: #{limit}%"
# Memory usage limits
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment