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

Parse command-line options for pumactl #1482

Merged
merged 2 commits into from Mar 19, 2018

Conversation

shayonj
Copy link
Contributor

@shayonj shayonj commented Dec 7, 2017

  • Before, we would remove any non-yielding
    args, but missed to actually parse them.
    Resulting in issues like, --pidfile or
    similar args not taking any effect.

Before

pumactl start -P ~/puma.pid

...

cat ~/puma.pid
=> No such file or directory

Now

pumactl start -P ~/puma.pid

...

cat ~/puma.pid
=> 131232

  • Remove misleading message of puma starting on pumactl exit: This way, when puma shuts down (running from pumactl), it does not end
    with "Puma is started" message. Because, the copy is dependent
    on the value of @command, the same will always point
    to start, if pumactl was issued a start, hence during
    exit, this message appeared as misleading.

Before

Puma starting in single mode...
* Version 3.10.0 (ruby 2.3.3-p222), codename: Russell's Teapot
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:3000
Use Ctrl-C to stop
^C- Gracefully stopping, waiting for requests to finish
=== puma shutdown: 2017-12-06 23:26:45 -0800 ===
- Goodbye!
Puma is started <===== Removing this message =====>

Now

Puma starting in single mode...
* Version 3.10.0 (ruby 2.3.3-p222), codename: Russell's Teapot
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:3000
Use Ctrl-C to stop
^C- Gracefully stopping, waiting for requests to finish
=== puma shutdown: 2017-12-06 23:26:45 -0800 ===
- Goodbye!

Before, we would remove any non-yielding
args, but missed to actually parse them.
Resulting in issues like, --pidfile or
similar args not taking any effect.
This way, when puma shuts down (running from pumactl), it does not end
with "Puma is started" message. Because, the copy is dependent
on the value of `@command`, the same will always point
to `start`, if pumactl was issued a `start`, hence during
exit, this message appeared as misleading.
@olleolleolle
Copy link
Contributor

@nateberkopec Are you looking for a test for this bug fix?

@nateberkopec nateberkopec merged commit 9faca80 into puma:master Mar 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants