Sha256: 1624ebcaa69e3ef1470a29d73b9b0a7e80d5577ccfb56df07eaf6a51ef30c3fb

Contents?: true

Size: 563 Bytes

Versions: 16

Compression:

Stored size: 563 Bytes

Contents

# frozen_string_literal: true

require 'resque/tasks'

namespace :resque do
  task setup: :environment do
    ENV['QUEUE'] ||= 'default'

    # Solution for the "prepared statements" on ActiveJob issue:
    #   Error while trying to deserialize arguments: PG::DuplicatePstatement: ERROR: prepared
    #   statement "a1" already exists
    #
    # Some references on this here:
    # https://github.com/rails/rails/pull/17607
    # https://github.com/rails/rails/pull/25827
    Resque.before_fork do
      ActiveRecord::Base.establish_connection
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
lcms-engine-0.5.5 lib/tasks/resque.rake
lcms-engine-0.5.4 lib/tasks/resque.rake
lcms-engine-0.5.3 lib/tasks/resque.rake
lcms-engine-0.5.2 lib/tasks/resque.rake
lcms-engine-0.5.1 lib/tasks/resque.rake
lcms-engine-0.5.0 lib/tasks/resque.rake
lcms-engine-0.4.2 lib/tasks/resque.rake
lcms-engine-0.4.1 lib/tasks/resque.rake
lcms-engine-0.4.0 lib/tasks/resque.rake
lcms-engine-0.3.1 lib/tasks/resque.rake
lcms-engine-0.1.4 lib/tasks/resque.rake
lcms-engine-0.3.0 lib/tasks/resque.rake
lcms-engine-0.1.3 lib/tasks/resque.rake
lcms-engine-0.2.0 lib/tasks/resque.rake
lcms-engine-0.1.2 lib/tasks/resque.rake
lcms-engine-0.1.0 lib/tasks/resque.rake