Skip to content

Instantly share code, notes, and snippets.

View albus522's full-sized avatar

David Genord II albus522

View GitHub Profile
def forked!
ActiveRecord::Base.connection.reconnect!
Rails.cache.instance_variable_get(:@data).reset
Mongoid.config.master.connection.close
load File.join(RAILS_ROOT, 'config/initializers/mongoid.rb')
end
def run(job)
runtime = Benchmark.realtime do
fork do