Fix resque exception

This commit is contained in:
Dmitriy Zaporozhets 2012-12-11 18:46:58 +02:00
parent 95af2baa37
commit 59a86e4229

View file

@ -1,12 +1,8 @@
require 'resque/tasks'
# Fix Exception
# ActiveRecord::StatementInvalid
# Error
# PGError: ERROR: prepared statement "a3" already exists
task "resque:setup" => :environment do
Resque.after_fork do |job|
ActiveRecord::Base.establish_connection
Resque.after_fork do
Resque.redis.client.reconnect
end
end