Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
shells
manager2-api
Commits
ead82f1b
Commit
ead82f1b
authored
Jan 27, 2019
by
Cool Fire
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
helpers/limits.rb
helpers/limits.rb
+3
-3
No files found.
helpers/limits.rb
View file @
ead82f1b
...
...
@@ -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'
data
[
username
][
'properties'
][
'cgroups'
][
'cpu'
]
end
...
...
@@ -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
}
%
"
end
# Memory usage limits
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment