Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using defined Puma config #205

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions lib/gemstash/cli/start.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,28 @@ def daemonize?
@cli.options[:daemonize]
end

def puma_config
File.expand_path("../puma.rb", __dir__)
def args
puma_args + pidfile_args + daemonize_args
end

def args
config_args + pidfile_args + daemonize_args
def puma_args
[
"--config", puma_config,
"--workers", puma_workers,
"--threads", puma_threads
]
end

def puma_workers
gemstash_env.config[:puma_workers] ? gemstash_env.config[:puma_workers].to_s : "0"
end

def puma_threads
gemstash_env.config[:puma_threads] ? gemstash_env.config[:puma_threads].to_s : "0"
end

def config_args
["--config", puma_config]
def puma_config
File.expand_path("../puma.rb", __dir__)
end

def daemonize_args
Expand Down