mirror of
https://github.com/ubicloud/ubicloud.git
synced 2025-10-04 05:42:15 +08:00
Use silence_fork_callback_warning to avoid the warning when using before_fork without workers. Puma changed from on_booted to after_booted event in 7, so update to that.
15 lines
295 B
Ruby
15 lines
295 B
Ruby
# frozen_string_literal: true
|
|
|
|
# :nocov:
|
|
environment ENV["RACK_ENV"] || "development"
|
|
port ENV["PORT"] || "3000"
|
|
threads 15, 15
|
|
enable_keep_alives false
|
|
silence_fork_callback_warning
|
|
silence_single_worker_warning
|
|
preload_app!
|
|
|
|
before_fork do
|
|
Sequel::DATABASES.each(&:disconnect)
|
|
end
|
|
# :nocov:
|