# File lib/spawn.rb, line 135 def thread_it(options) # clean up stale connections from previous threads ActiveRecord::Base.verify_active_connections!() thr = Thread.new do # run the long-running code block yield end return SpawnId.new(:thread, thr) end