fix resque start

This commit is contained in:
Andrey Kumanyaev 2012-10-09 00:19:07 +04:00
parent a635b9da97
commit 03836cc591

View file

@ -1 +1,14 @@
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"