Skip to content

Instantly share code, notes, and snippets.

@kulesa
Created November 5, 2011 06:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kulesa/1341179 to your computer and use it in GitHub Desktop.
Save kulesa/1341179 to your computer and use it in GitHub Desktop.
resque rake environment task
namespace :resque do
task :setup => :environment do
Resque.before_fork { ActiveRecord::Base.connection.disconnect! }
Resque.after_fork { ActiveRecord::Base.establish_connection }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment