-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Puma::ControlCLI - allow refork command to be sent as a request #2868
Conversation
lib/puma/control_cli.rb
Outdated
@@ -33,10 +33,10 @@ class ControlCLI | |||
COMMANDS = CMD_PATH_SIG_MAP.keys.freeze | |||
|
|||
# commands that cannot be used in a request | |||
NO_REQ_COMMANDS = %w{refork}.freeze | |||
NO_REQ_COMMANDS = %w[].freeze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should just remove this constant then, yes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like I'm missing something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can, but I thought I'd leave the code in case a 'signal only' command was added. Or, previous to this PR, refork
was a signal only command, and I never tested it using a control server that had a control uri.
Leaving as is means that CI will check that if one is added. Ok, I know it's a little odd...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I commented out the constant and the clause that used it. Same for the test (skipped if the constant is undefined).
I can remove if you want... I just don't want myself or someone else making the same mistake again, so the commented code leaves a big hint...
53061a2
to
afff8d2
Compare
lib/puma/control_cli.rb
Outdated
# commands that cannot be used in a request | ||
NO_REQ_COMMANDS = %w{refork}.freeze | ||
# NO_REQ_COMMANDS = %w[].freeze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should just remove this altogether?
afff8d2
to
38d61e0
Compare
I rebased and added 'signal only' commands that were previously unavailable using I think I found all of them. Hence, |
* Puma::ControlCLI - allow refork command to be sent as a request * Puma::ControlCLI - add signal only commands * Puma::ControlCLI - check whether signal is available
…#2868) * Puma::ControlCLI - allow refork command to be sent as a request * Puma::ControlCLI - add signal only commands * Puma::ControlCLI - check whether signal is available
Description
Currently, the refork command will only be sent as a signal by
Puma::ControlCLI
. Change to allow it be sent as a request if the control server is setup with a uri.Closes #2866
Your checklist for this pull request
[ci skip]
to the title of the PR.#issue
" to the PR description or my commit messages.