Commit 59a86e4229f187667a3f855aaf6250fd29655df2
1 parent
95af2baa
Exists in
master
and in
4 other branches
Fix resque exception
Showing
1 changed file
with
2 additions
and
6 deletions
Show diff stats
lib/tasks/resque.rake
1 | 1 | require 'resque/tasks' |
2 | 2 | |
3 | -# Fix Exception | |
4 | -# ActiveRecord::StatementInvalid | |
5 | -# Error | |
6 | -# PGError: ERROR: prepared statement "a3" already exists | |
7 | 3 | task "resque:setup" => :environment do |
8 | - Resque.after_fork do |job| | |
9 | - ActiveRecord::Base.establish_connection | |
4 | + Resque.after_fork do | |
5 | + Resque.redis.client.reconnect | |
10 | 6 | end |
11 | 7 | end |
12 | 8 | ... | ... |