Skip to content

Commit a031473

Browse files
committed
using defined Puma config
This changes threads the `gemstash_env.config` options for Puma through to the `Puma::CLI.new` call. Prior to this change `:puma_workers` and `:puma_threads` were ignored when booting Gemstash via the CLI
1 parent c31975f commit a031473

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

lib/gemstash/cli/start.rb

+15-3
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,24 @@ def puma_config
3333
File.expand_path("../../puma.rb", __FILE__)
3434
end
3535

36+
def store_pidfile
37+
gemstash_env.pidfile = pidfile?
38+
end
39+
40+
def pidfile?
41+
@cli.options[:pidfile]
42+
end
43+
3644
def args
37-
config_args + pidfile_args + daemonize_args
45+
puma_args + pidfile_args + daemonize_args
3846
end
3947

40-
def config_args
41-
["--config", puma_config]
48+
def puma_args
49+
[
50+
"--config", puma_config,
51+
"--workers", gemstash_env.config[:puma_workers],
52+
"--threads", gemstash_env.config[:puma_threads]
53+
]
4254
end
4355

4456
def daemonize_args

0 commit comments

Comments
 (0)