Skip to content

Commit

Permalink
Merge pull request #301 from steverecio/configure_workers
Browse files Browse the repository at this point in the history
Configure workers
  • Loading branch information
Shiva Poudel committed Apr 26, 2016
2 parents bde55c0 + 292f08d commit 80297c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions manifests/gunicorn.pp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
$appmodule = 'app:app',
$osenv = false,
$timeout = 30,
$workers = false,
$access_log_format = false,
$accesslog = false,
$errorlog = false,
Expand Down
6 changes: 5 additions & 1 deletion templates/gunicorn.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ CONFIG = {
<% else -%>
'--bind=<%= @bind %>',
<% end -%>
'--workers=<%= @processorcount.to_i*2 %>',
<% if @workers -%>
'--workers=<%= @workers %>'
<% else -%>
'--workers=<%= @processorcount.to_i*2 + 1 %>',
<% end -%>
'--timeout=<%= @timeout %>',
<% if @access_log_format -%>
'--access-logformat=<%= @access_log_format %>',
Expand Down

0 comments on commit 80297c4

Please sign in to comment.