Commit 03836cc5917dd4cc1b30bd4e298795162d3609fd
1 parent
a635b9da
Exists in
master
and in
4 other branches
fix resque start
Showing
1 changed file
with
13 additions
and
0 deletions
Show diff stats
lib/tasks/resque.rake
1 | require 'resque/tasks' | 1 | require 'resque/tasks' |
2 | + | ||
3 | +# Fix Exception | ||
4 | +# ActiveRecord::StatementInvalid | ||
5 | +# Error | ||
6 | +# PGError: ERROR: prepared statement "a3" already exists | ||
7 | +task "resque:setup" => :environment do | ||
8 | + Resque.after_fork do |job| | ||
9 | + ActiveRecord::Base.establish_connection | ||
10 | + end | ||
11 | +end | ||
12 | + | ||
13 | +desc "Alias for resque:work (To run workers on Heroku)" | ||
14 | +task "jobs:work" => "resque:work" |