Skip to content

Instantly share code, notes, and snippets.

@jurikern
Created May 10, 2012 20:36
Show Gist options
  • Save jurikern/2655725 to your computer and use it in GitHub Desktop.
Save jurikern/2655725 to your computer and use it in GitHub Desktop.
Resque and resque-scheduler bug on production environment
require 'resque/tasks'
require 'resque_scheduler/tasks'
task "resque:setup" => :environment do
Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection }
end
namespace :resque do
task :setup do
# ...
end
end
PG::Error: ERROR: prepared statement "a3" already exists :
SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.on = c.rel namespace WHERE c.relkind in ('v','r') AND c.relname = $1 AND n.nsp name = ANY (current_schema(false))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment