Fixes issues in Puma when used with Heroku Router 2.0. See https://www.heroku.com/blog/pumas-routers-keepalives-ohmy/
18 lines
313 B
Ruby
18 lines
313 B
Ruby
# frozen_string_literal: true
|
|
|
|
# :nocov:
|
|
environment ENV["RACK_ENV"] || "development"
|
|
port ENV["PORT"] || "3000"
|
|
threads 15, 15
|
|
enable_keep_alives false
|
|
|
|
if @config.options[:workers] > 0
|
|
silence_single_worker_warning
|
|
preload_app!
|
|
|
|
before_fork do
|
|
Sequel::DATABASES.each(&:disconnect)
|
|
end
|
|
end
|
|
# :nocov:
|