Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
59f14e1e
Commit
59f14e1e
authored
Feb 22, 2021
by
Ash McKenzie
Committed by
Kamil Trzciński
Feb 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check Puma.respond_to?(:cli_config) first
parent
3340792d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
config/initializers/validate_puma.rb
config/initializers/validate_puma.rb
+0
-4
lib/gitlab/runtime.rb
lib/gitlab/runtime.rb
+4
-1
No files found.
config/initializers/validate_puma.rb
View file @
59f14e1e
# frozen_string_literal: true
def
max_puma_workers
Puma
.
cli_config
.
options
[
:workers
].
to_i
end
if
Gitlab
::
Runtime
.
puma?
&&
!
Gitlab
::
Runtime
.
puma_in_clustered_mode?
raise
'Puma is only supported in Clustered mode (workers > 0)'
if
Gitlab
.
com?
...
...
lib/gitlab/runtime.rb
View file @
59f14e1e
...
...
@@ -82,7 +82,10 @@ module Gitlab
end
def
puma_in_clustered_mode?
puma?
&&
Puma
.
cli_config
.
options
[
:workers
].
to_i
>
0
return
unless
puma?
return
unless
Puma
.
respond_to?
(
:cli_config
)
Puma
.
cli_config
.
options
[
:workers
].
to_i
>
0
end
def
max_threads
...
...
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