Fix resque exception
This commit is contained in:
parent
95af2baa37
commit
59a86e4229
1 changed files with 2 additions and 6 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue