Created
November 5, 2011 06:26
-
-
Save kulesa/1341179 to your computer and use it in GitHub Desktop.
resque rake environment task
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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