rosa-build/config/puma/production.rb

23 lines
581 B
Ruby
Raw Permalink Normal View History

2015-11-09 13:29:21 +00:00
base_path = "/app/rosa-build"
bind 'unix:///app/rosa-build/rosa_build.sock'
2013-11-27 18:20:05 +00:00
environment ENV['RAILS_ENV'] || 'production'
2018-03-20 10:00:03 +00:00
threads *(ENV['PUMA_THREADS'] || '12,12').split(',')
workers ENV['PUMA_WORKERS'] || 5
2013-11-27 18:20:05 +00:00
2013-11-27 19:18:01 +00:00
2013-11-27 18:20:05 +00:00
preload_app!
on_worker_boot do
if defined?(ActiveRecord::Base)
ActiveSupport.on_load(:active_record) do
ActiveRecord::Base.connection.disconnect! rescue ActiveRecord::ConnectionNotEstablished
2019-04-06 16:26:11 +01:00
ActiveRecord::Base.establish_connection
2013-11-27 18:20:05 +00:00
end
Rails.logger.info('Connected to PG')
end
Redis.connect!
Rails.logger.info('Connected to Redis')
2013-11-27 19:18:01 +00:00
end