diff --git a/lib/gemstash/cli/start.rb b/lib/gemstash/cli/start.rb index 923fc3e1..9688a046 100644 --- a/lib/gemstash/cli/start.rb +++ b/lib/gemstash/cli/start.rb @@ -33,12 +33,24 @@ def puma_config File.expand_path("../../puma.rb", __FILE__) end + def store_pidfile + gemstash_env.pidfile = pidfile? + end + + def pidfile? + @cli.options[:pidfile] + end + def args - config_args + pidfile_args + daemonize_args + puma_args + pidfile_args + daemonize_args end - def config_args - ["--config", puma_config] + def puma_args + [ + '--config', puma_config, + '--workers', gemstash_env.config[:puma_workers], + '--threads', gemstash_env.config[:puma_threads], + ] end def daemonize_args