Skip to content

Commit

Permalink
Fix warn_if_in_single_mode incorrect message (#3111)
Browse files Browse the repository at this point in the history
The message could either be in the positive `but Puma is configured to run in single mode (worker count = 0 )` or the negative `but Puma is not configured to run in cluster mode (worker count > 0 )`. I went with negative because it explicitly instructs what is required in order for hooks to run.
  • Loading branch information
adzap committed Mar 30, 2023
1 parent d79f59d commit 52fa8f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puma/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,7 @@ def warn_if_in_single_mode(hook_name)
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, " \
"but Puma is not configured to run in cluster mode (worker count > 0 ), " \
"so your `#{hook_name}` block did not run"

LogWriter.stdio.log(log_string)
Expand Down

0 comments on commit 52fa8f6

Please sign in to comment.