fix resque start
This commit is contained in:
parent
a635b9da97
commit
03836cc591
1 changed files with 13 additions and 0 deletions
|
@ -1 +1,14 @@
|
||||||
require 'resque/tasks'
|
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
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
desc "Alias for resque:work (To run workers on Heroku)"
|
||||||
|
task "jobs:work" => "resque:work"
|
||||||
|
|
Loading…
Add table
Reference in a new issue