Skip to content

Commit

Permalink
Chore: Puma config tweaks
Browse files Browse the repository at this point in the history
Because:
- Barnes doesnt need to be started in the puma config file.
  • Loading branch information
KevinMulhern committed Nov 30, 2024
1 parent bcabc75 commit 20fab7b
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions config/puma.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'barnes'
enable_keep_alives false

workers Integer(ENV['WEB_CONCURRENCY'] || 2)
threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5)
Expand All @@ -8,14 +8,7 @@

port ENV['PORT'] || 3000
environment ENV['RACK_ENV'] || 'development'
enable_keep_alives false

on_worker_boot do
# Worker specific setup for Rails 4.1+
# See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
ActiveRecord::Base.establish_connection
end

before_fork do
Barnes.start
end

0 comments on commit 20fab7b

Please sign in to comment.