Skip to content

Instantly share code, notes, and snippets.

@spraints
Created November 20, 2013 16:02
Show Gist options
  • Save spraints/7565639 to your computer and use it in GitHub Desktop.
Save spraints/7565639 to your computer and use it in GitHub Desktop.
worker_pool 6
queue '*'
before_fork do
require File.expand_path('config/environment')
Rails.application.eager_load!
ActiveRecord::Base.connection.disconnect!
end
after_fork do
ActiveRecord::Base.establish_connection
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment