Skip to content

Commit 2c1c3e1

Browse files
committed
Remove unused Puma cluster mode configuration
This removes the preload_app! directive and on_worker_boot block from config/puma.rb. These cluster-mode features are not used since the application runs in single-process mode (no workers configured). VERIFICATION THAT CLUSTER MODE IS NOT USED: 1. No 'workers' setting in config/puma.rb - cluster mode requires explicitly setting 'workers N' where N > 0. Without this, Puma runs in single-process mode by default. 2. No WEB_CONCURRENCY environment variable - searched entire codebase, no references found. This is Heroku's standard variable for controlling worker count. 3. Procfile uses standard single-process command: 'bundle exec puma -C config/puma.rb' with no worker-related flags. 4. No environment-specific Puma configs - only config/puma.rb exists, no production/staging overrides. 5. Environment configs (development/production/test.rb) have no Puma worker configuration. 6. The Puma 7.2.0 warning itself confirms the on_worker_boot block "will not execute in the current Puma configuration." IMPACT: - No behavior change - this code was never executing - Removes warning introduced in Puma 7.x about unused callbacks - Prepares for Puma 8.0 where on_worker_boot will be removed entirely - If cluster mode is needed in future, these are standard patterns that can be easily restored Related to #2447
1 parent da058ae commit 2c1c3e1

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

config/puma.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,3 @@
3434
pidfile ENV["PIDFILE"] if ENV["PIDFILE"]
3535
worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
3636
environment ENV.fetch("RAILS_ENV") { "development" }
37-
preload_app!
38-
# "worker" is the Puma term, not a background job.
39-
on_worker_boot do
40-
ActiveSupport.on_load(:active_record) do
41-
ActiveRecord::Base.establish_connection
42-
end
43-
44-
SemanticLogger.reopen
45-
end

0 commit comments

Comments
 (0)