I have got my resque setup process complete, tested successfully with a simple job. It is recommended to close ActiveRecord connection in the pool setup rake task and establish the connection on after_prefork
to avoid stale connections before forking.
I now need to do this for mongoid, I can establish the connection by doing Mongoid.load! 'path_to_mongoid.yml'
but I can't seem to find a way to close the connection, I tried disconnect, close
methods but I don't know if they get reconnected or if it doesn't kill off the connection. I tried this in a rails console, I was able to test it with ActiveRecord doesn't work with mongoid.