Sequel is a widely used ORM alternative to ActiveRecord, and just as with ActiveRecord, it needs to be disconnected on before_fork if preload_app! is used.
For handling ActiveRecord, there's currently in puma.rb.erb:
before_fork do
ActiveRecord::Base.connection_pool.disconnect!
end
For Sequel it would be like this:
before_fork do
Sequel::Model.db.disconnect if defined?(Sequel::Model)
end
Could we include a setting puma_init_sequel in the spirit of puma_init_active_record and include the snippet above in the template?
Sequel is a widely used ORM alternative to ActiveRecord, and just as with ActiveRecord, it needs to be disconnected on
before_fork
ifpreload_app!
is used.For handling ActiveRecord, there's currently in puma.rb.erb:
For Sequel it would be like this:
Could we include a setting
puma_init_sequel
in the spirit ofpuma_init_active_record
and include the snippet above in the template?