-
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
Warn when clustered-only hooks are defined in single mode #3089
Warn when clustered-only hooks are defined in single mode #3089
Conversation
a3cbbd9
to
b0ac31e
Compare
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.
One small change in the log string. I would also like to see some tests that the logstring is actually logged for each of the hooks you've added it to.
Thank you so much for contributing to Puma! An excellent first contribution.
b0ac31e
to
5d8afd4
Compare
…le mode Clustered-only hooks won't be called in single mode, so this commit adds a log to warn users about that. Also adds `silence_fork_callback_warning` option to opt-out of the default warning log.
5d8afd4
to
4340f72
Compare
Very nice 👏 |
if (@options[:workers] || 0) == 0 | ||
log_string = | ||
"Warning: You specified code to run in a `#{hook_name}` block, " \ | ||
"but Puma is configured to run in cluster mode, " \ |
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.
this copy was fixed here: https://github.com/puma/puma/pull/3111/files
Description
Address #2950
Your checklist for this pull request
[ci skip]
to the title of the PR.#issue
" to the PR description or my commit messages.