Sha256: f2ca0e093d5e1e4ebedc7aa85dece23b5e3ffbbe73383162088f72231c468e7e

Contents?: true

Size: 501 Bytes

Versions: 16

Compression:

Stored size: 501 Bytes

Contents

require 'resque/pool/tasks'

task 'resque:setup' => :environment # If you want any Resque specific configuration, set it in here

task "resque:pool:setup" do
  # close any sockets or files in pool manager
  ActiveRecord::Base.connection.disconnect!
  # and re-open them in the resque worker parent
  Resque::Pool.after_prefork do |job|
    ActiveRecord::Base.establish_connection
  end
end

task 'resque:pool:setup' do
  Resque::Pool.after_prefork do |job|
    Resque.redis.client.reconnect
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
aleph_analytics-0.4.9.pre.dev lib/tasks/resque_setup.rake
aleph_analytics-0.4.8 lib/tasks/resque_setup.rake
aleph_analytics-0.4.7 lib/tasks/resque_setup.rake
aleph_analytics-0.4.4 lib/tasks/resque_setup.rake
aleph_analytics-0.4.2 lib/tasks/resque_setup.rake
aleph_analytics-0.4.1 lib/tasks/resque_setup.rake
aleph_analytics-0.3.0 lib/tasks/resque_setup.rake
aleph_analytics-0.2.0 lib/tasks/resque_setup.rake
aleph_analytics-0.1.0 lib/tasks/resque_setup.rake
aleph_analytics-0.0.6 lib/tasks/resque_setup.rake
aleph_analytics-0.0.5 lib/tasks/resque_setup.rake
aleph_analytics-0.0.4 lib/tasks/resque_setup.rake
aleph_analytics-0.0.3 lib/tasks/resque_setup.rake
aleph_analytics-0.0.2 lib/tasks/resque_setup.rake
aleph_analytics-0.0.1.alpha lib/tasks/resque_setup.rake
aleph_analytics-0.0.0.alpha lib/tasks/resque_setup.rake