diff --git a/README.md b/README.md index 0dcb10ce..aaa571a3 100644 --- a/README.md +++ b/README.md @@ -137,6 +137,11 @@ This code can be used to setup the process before booting the application, allow you to do some Puma-specific things that you don't want to embed in your application. For instance, you could fire a log notification that a worker booted or send something to statsd. This can be called multiple times. +Constants loaded by your application (such as `Rails`) will not be available in `on_worker_boot`. +However, these constants _will_ be available if `preload_app!` is enabled, either explicitly in your `puma` config or automatically if +using 2 or more workers in cluster mode. +If `preload_app!` is not enabled and 1 worker is used, then `on_worker_boot` will fire, but your app will not be preloaded and constants will not be available. + `before_fork` specifies a block to be run before workers are forked: ```ruby