Sha256: 9361f494cffc29d97f845f8d79fafdc7db3fefb9970978807561d8510a825af9

Contents?: true

Size: 451 Bytes

Versions: 8

Compression:

Stored size: 451 Bytes

Contents

# Load the Rails app all the time.
# See https://github.com/resque/resque/wiki/FAQ for more details
require 'resque/pool'
require 'resque/pool/tasks'

# This provides access to the Rails env within all Resque workers
task "resque:setup" => :environment

task 'resque:pool:setup' do
  ActiveRecord::Base.connection.disconnect!

  Resque::Pool.after_prefork do |j|
    ActiveRecord::Base.establish_connection
    Resque.redis.client.reconnect
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sufia-models-6.7.0 lib/generators/sufia/models/templates/config/resque.rake
sufia-models-6.6.1 lib/generators/sufia/models/templates/config/resque.rake
sufia-models-6.6.0 lib/generators/sufia/models/templates/config/resque.rake
sufia-models-6.5.0 lib/generators/sufia/models/templates/config/resque.rake
sufia-models-6.4.0 lib/generators/sufia/models/templates/config/resque.rake
sufia-models-6.3.0 lib/generators/sufia/models/templates/config/resque.rake
sufia-models-6.2.0 lib/generators/sufia/models/templates/config/resque.rake
sufia-models-6.1.0 lib/generators/sufia/models/templates/config/resque.rake